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 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
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.
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.