Age | Commit message (Collapse) | Author | Files | Lines |
|
We don't need to check when processing the script args, whether the
correct types were passed. We check this upfront in typed_pos_args now.
|
|
In commit c239ce31f55579cfe1e29b769a8bda97deca2166 support was added to
these functions to accept various non-string types.
Despite the commit/PR documenting that only add_install_script is
permitted to accept built files, the actual check parameter was set, for
all three, to "True" (so the function was never invoked with False at
all). This meant that actually attempting to use the allowed types would
fail at postconf or dist, with python tracebacks in the former case and
"Failed to run dist script" in the latter case.
This was partially ameliorated in commit
6c5bfd4c241e94f5e0f4dea9ba7fb5d5090a4802 which added typed_pos_args, but
unfortunately those typed_pos_args were all over the place.
For postconf:
- They banned external programs as additional args (which should be allowed)
- They banned built executables (good)
- They allowed custom targets as additional args (bad)
For dist:
- they allowed external programs (good)
- they allowed built executables, but only as the first argument (bad, also ???)
- they allowed custom targets, but only as additional arguments (bad, also ???)
Fix this all to only allow the same argument types for both the script
argument and the script-args arguments. That type is known at configure
time and restricted to source files, configured files, and found
programs.
|
|
In commit 2c0eaf5c4f4493146355eeb8521c17a3c2ef5acd support was added for
install scripts to accept found programs, built executables, or custom targets.
In commit c239ce31f55579cfe1e29b769a8bda97deca2166, this was extended to
dist and postconf scripts too (although it was documented that those
should not accept targets that are built by ninja).
Despite the commit/PR claiming that all of these should always accept
files and configured files, this was only true for arguments other than
the first, until commit f808c955eab983b31feee130f0947c7cb254a94f.
In amongst all this, FeatureNew checks were never registered for the
first argument, only for additional arguments, until late in the game
with the addition of FeatureNew checks for File objects.
Fix this in part by moving the 3 different File checks into one, inside the
function that processes the first script, and make that function check
for FeatureNew on anything else too.
|
|
Calling interpreter implementation methods is just a bad idea, apart
from the extra type checking that goes into it, we need to pass more
arguments than we need to calling the impl method.
|
|
Without this patch, the name of the RunTarget is passed to the
install script; for the enclosed test, meson setup (incorrectly)
succeeds, but installation fails.
|
|
|
|
Fixes: #9454
|
|
|
|
discovered via flake8 --select E303
|
|
Another commit in my quest to rid InterpreterBase from all higher
level object processing logic.
Additionally, there is a a logic change here, since `str.join` now
uses varargs and can now accept more than one argument (and supports
list flattening).
|
|
Now that we have type checking, we can be sure that this code is
unreachable, and remove it.
|
|
|
|
This really is more of a struct than a dict, as the types are disjoint
and they are internally handled, (ie, not from user input). This cleans
some things up, in addition I spotted a bug in the ModuleState where the
dict with the version and license is passed to a field that expects just
the version string.
|
|
|
|
Taht should have been converted to build/program module objects, not
interpterter objects
|
|
Currently, EnvironmentVariablesObject is a strange
holder-that's-not-a-holder. This has implicaitons for things that expect
to get an EnvironmentVariables object, as we can't automatically
unholder it, and instead have to to manually do so. Now we can
automatically unholder it, which makes everything much nicer.
|
|
|
|
The correct way to mark these is `KwargInfo(..., (T, type(None)))`.
There's also a few cases of `(T, None)` which is invalid, as `None`
isn't a type
|
|
It should build the fallback subprject with default_library=static and
override the dependency for both static=True and static kwarg not given.
Fixes: #8050.
|
|
Fixes: #7007.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|