Functions are now analyzed when they are defined so they aren't
erroneously marked as dead code. This led to some weird typechecking
issues that ended up pushing me to clean up some of the typechecking
code.
- wip "unencapsulated" module. This just means that the module is
loaded into the global scope. You could then write functions like
`vcs_tag` in this global module to be used by all meson files. This
might be removed.
- remove export() function and instead use a lua-like return to export
from the module.
- track language mode in function definitions. Necessary for functions
to use internal-only functions.
- use assigned function name in error messages
- fix embedded source reopening in error messages
- reduce number of node types that get marked as dead code
- create true/false bools on workspace initialization with known ids.
Future code should use these rather than making new boolean objects to
save memory.
- add a new test script-module
python_installation is an external_program with a couple of extra
methods related to the Python installation. Right now, we only add the
type.
Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Seedo Paul <seedoeldhopaul@gmail.com>
This will be required for find_program('meson') to return an external
program with the command ['muon', 'meson']. It also allows muon to
return ['muon', 'samu'] as the result for find_program('ninja'), which
is kind of neat.
This gives us 32 extra potential object types to be able to typecheck.
Unfortunately with c99 we can't control the width of enum types, so we
have to switch to #defines.
This allows us to remove the unit test directory, and removes one of the
consumers of path.c. Some of these functions may also be useful for
internal scripts.
- separate install functionality to install.c and
functions/kernel/install.c
- remove specialized install functions that are only used in 1 place
- implement preserve_path for push_install_targets
The initial env implementation assumed that append/prepend only worked
on values that were previously set in the environment() object. In
reality, these are supposed to apply to the current environment if
the key has not been env.set() previously.
Allow import('xxx'[, required: true]) to succeed, but do a few things to
make it a little nicer:
- the name of the module is validated, so random strings aren't accepted
- if you do required: false, you just get a normal not-found module
- if required is true, then you get a warning when you import() the
module, and a fatal error if you try to use it
- the error message tells you how you can use required: false to make
your build work with muon.
The main optimization is to dedup most of the dependency arrays. This
drastically improves performance for some projects that like to use deep
nests of dependency objects.
Calculate dependency information ahead of time, rather than on-demand.
Also unify how dependency information is stored between build targets
and dependencies by using a common sub-struct "build_dep".
The same sort of functionality can be achieved by using machine files,
once they are implemented. Build system regeneration has also been made
simpler, and just invokes setup with the original command line directly