| Age | Commit message (Collapse) | Author |
|
This simplifies a bunch of cases, and likely fixes some annoying bugs
in cross compile situations where should have been passing this and
weren't.
|
|
This allows for a lot of type safety to be introduced, and almost all
casting to be removed.
|
|
We passed a DoSubproject call without half of the fields we'd agreed to
fill out. Which left things running on hopes and dreams.
|
|
|
|
The lookup code only has two callers. One of them is an internal caller
that never sets the `required` key, and the other is the interpreter.
Moving this code to the interpreter allows us to simplify the common
code, especially the types.
|
|
|
|
|
|
We're about to lower the priority of the default_options that were passed
to subproject() and dependency() below that of machine files and command
line options.
Whenever a static dependency is falling back to a subproject, however, do
not do that. It makes no sense to build a shared library in that case.
Another possibility however could be to just make it an error.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Replace optlist2optdict with a convertor. However, while default_options
should use OptionKeys like it did before the option refactoring,
override_options keeps using strings.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Apply the default_library=... default after the default options have been
converted to a dictionary, to avoid having to deal with all the possible types
of the default_options keyword argument.
Fixes: #14532
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This is an old method, that is now just a wrapper around the OptionStore
method, that doesn't add any value. It's also an option related method
attached to the CoreData instead of the OptionStore, so useless and a
layering violation.
|
|
|
|
|
|
|
|
|
|
The method can be overridden by setting the `method` key in the wrap
file and always defaults to 'meson'. cmake.subproject() is still needed
in case specific cmake options need to be passed.
This also makes it easier to extend to other methods in the future e.g.
cargo.
|
|
|
|
We actually do not and should not care about wrap-mode at all for this.
We want to cache dependency lookups whenever humanly possible, but only
use them in cases where we would anyways be using them -- which in
particular means if we said to force a subproject fallback for this dep,
we want to bypass the cache.
Currently, we handle this by always looking up the cache for all
dependencies, but clearing the cache at startup if a reconfigure means
we are changing our resolution strategy. This is bad -- we might have
many dependencies that are worth caching, and only one dependency that
should stop being cached and use a subproject instead.
The simple solution is to handle the forcefallback case when doing a
cache lookup, and not do a cache lookup at all. Now we don't have to
nuke the entire cache. In fact, if a future reconfigure changes the
forcefallback state back to not being forced, we can reuse the original
cached dependency, which is still there.
Closes #11828
|
|
When _subproject_impl() is called the wrap file could not have been
downloaded form wrapdb yet, it is done when fetching the subproject.
Delay getting the variable name to when we actually need it, at that
point we are sure the wrap file has been downloaded.
|
|
At several points in the code base, f-strings are not correctly expanded
due to missing 'f' string prefix. This fixes all the occurrences I could
find.
|
|
These are only used for type checking, so don't bother importing them at
runtime.
Generally add future annotations at the same time, to make sure that
existing uses of these imports don't need to be quoted.
|
|
|
|
|
|
This will be used to handle the interpreter subproject as well
|
|
The dep.name() function schould always return the name of the
dependency as documented. No matter if it was found or not.
https://mesonbuild.com/Reference-manual_returned_dep.html#depfound
|
|
Fixes: #9271
|
|
This removes the warning when using default_options without fallback
kwarg completely because a subproject does not know if the main project
has an implicit fallback or not, so it could set default_options even if
not fallback is available at all.
Fixes: #9278
|
|
That used to abort in previous Meson versions but 0.59 stopped
forbidding that by mistake.
|
|
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: #9065
|
|
|
|
|
|
|
|
The dependency lookup is a lot of complex code. This refactor it all
into a single file/class outside of interpreter main class. This new
design allows adding more fallbacks candidates in the future (e.g. using
cc.find_library()) but does not yet add any extra API.
|