Commit Graph

12 Commits

Author SHA1 Message Date
Eli Schwartz 71a5db0a03
dub module: use typed_pos_args to check positional arguments
We cannot use typed_kwargs though, because we allow fully arbitrary
kwargs and add them as keys in the generated dub file.
2022-03-24 02:07:02 -04:00
Eli Schwartz 688b4bac76 add FeatureNew decorators for various modules that were lacking them
Going back to 0.38, though some of them are far older. The original
implementation of FeatureNew only added backdated feature checks that
far, anyway.
2021-12-31 12:03:57 +02:00
Eli Schwartz ee0baa97cd modules: use find_program implementation to find programs
Do not use ExternalProgram as that is too low-level and doesn't handle
e.g. machine file overrides.

Fixes #9733
2021-12-21 12:17:10 +01:00
Dylan Baker c0350d61a3 modules/dlang: Fix dependencies that should have been updated 2021-08-03 00:17:24 +03:00
Daniel Mensinger 3e396b3782
fix: Always explicitly set encoding for text files (fixes #8263) 2021-06-29 11:28:08 +02:00
Daniel Mensinger 95b70bcb97 deps: Split dependencies.base
Split the Factory and dependency classes out
of the base.py script to improve maintainability.
2021-06-03 10:23:27 -07:00
Xavier Claessens 2e02ef6592 modules: Add methods dict everywhere
This fix calling random internal methods from meson.build as long as
they were not prefixed by underscore.
2021-05-28 15:17:10 -04:00
Xavier Claessens 723c5227a4 modules: Remove snippet methods
The only advantage they have is they have the interpreter in arguments,
but it's already available as self.interpreter. We should discourage
usage of the interpreter API and rely on ModuleState object instead in
the future.

This also lift the restriction that a module method cannot add build
targets, but that was not enforced for snippet methods anyway (and some
modules were doing it) and it's really loose restriction as it should
check for many other things if we wanted to make it consistent.
2021-05-28 15:17:10 -04:00
Dylan Baker 40e3577a65 split program related classes and functions out of dependencies
Dependencies is already a large and complicated package without adding
programs to the list. This also allows us to untangle a bit of spaghetti
that we have.
2021-03-19 08:47:10 -04:00
Eli Schwartz 4340bf34fa
various python neatness cleanups
All changes were created by running

"pyupgrade --py3-only --keep-percent-format"

and committing the results. I have not touched string formatting for
now.

- use set literals
- simplify .format() parameter naming
- remove __future__
- remove default "r" mode for open()
- use OSError rather than compatibility aliases
- remove stray parentheses in function(generator) scopes
2021-03-04 17:11:26 -05:00
FFY00 6727af4e61
dlang module: allow all configuration types when generating dub.json 2018-07-16 12:39:29 +01:00
FFY00 ec01a77421
dlang module: add a method to generate a dub file 2018-06-17 22:34:32 +01:00