Commit Graph

11117 Commits

Author SHA1 Message Date
Orta Therox 2e8729a7e6 Update Quick-guide.md 2021-06-19 15:41:54 +03:00
Daniel Mensinger 7c757dff71 holders: Fix the remaining code to respect the holder changes 2021-06-18 23:48:33 +02:00
Daniel Mensinger 34c28dc92c holders: remove unholder 2021-06-18 23:48:33 +02:00
Daniel Mensinger 84a3e459a8 holders: Introduce BothLibraries 2021-06-18 23:48:33 +02:00
Daniel Mensinger c2c7f7c9d7 holders: Ensure that InterpreterBase is the sole instance for (un)holderifying 2021-06-18 23:48:33 +02:00
Daniel Mensinger 6879e84c48 holders: Move get_version from directly to ExternalProgram 2021-06-18 23:48:33 +02:00
Daniel Mensinger 66b32a4591 holders: Introduce HoldableObject 2021-06-18 23:48:33 +02:00
Daniel Mensinger d601227cb2 interpreter: Add FileHolder and remove specical case for File 2021-06-18 23:48:33 +02:00
Daniel Mensinger 7be172fe16 interpreter: Meson does not have floats --> remove them 2021-06-18 23:48:33 +02:00
Daniel Mensinger 63ade7d937 interpreter: Add a new MesonInterpreterObject for non-elementary objects 2021-06-18 23:48:33 +02:00
Daniel Mensinger 202e345dfb interpreter: Refactor interpreter.compiler to use ObjectHolder 2021-06-18 23:48:33 +02:00
Daniel Mensinger 2b09af834a interpreter: Refactor ObjectHolder to extend InterpreterObject 2021-06-18 23:48:33 +02:00
Daniel Mensinger 8f997efc8b decorators: Add not_set_warning to KwargInfo 2021-06-18 23:48:33 +02:00
Daniel Mensinger bad14b23d2 decorators: Fix typo 2021-06-18 23:48:33 +02:00
Daniel Mensinger 850f64b9ab build: textwrap.dedent() some strings 2021-06-18 23:48:33 +02:00
Daniel Mensinger 2c08e55f85 typing: Import missing classes in interpreterobjects.py 2021-06-18 23:48:33 +02:00
Daniel Mensinger 468a215341 mesonlib: Add MesonBugException 2021-06-18 23:48:33 +02:00
Daniel Mensinger 99a91df844 tests: clear mesonlib.project_meson_versions (which **really** needs a refactor) 2021-06-18 23:48:33 +02:00
Daniel Mensinger b2112bc4f6 tests: Always enable the traceback in run_project_tests.py 2021-06-18 23:48:33 +02:00
Daniel Mensinger 10afec575b tests: Add visual seperator to the test logs in run_project_tests.py 2021-06-18 23:48:33 +02:00
Dylan Baker 79fec1ce4e modules/qt: use append rather than extend in preprocess
Because that's what we need, of course
2021-06-18 09:52:23 -07:00
Dylan Baker f7eda0e822 modules/qt: allow string values for include_directories
This should have been supported before, but wasn't.
2021-06-18 09:52:23 -07:00
Dylan Baker 6d52ddf3c7 build: add type annotations for the IncludeDirs object 2021-06-18 09:52:23 -07:00
Dylan Baker 3ec2cf9c60 interpreter: add type annotations to build_incdir_object
and use textwrap.dedent to make the very large messages more readable
and not break method folding.
2021-06-18 09:52:23 -07:00
Xavier Claessens 5f3b73beb5 dependency: Empty fallback is the same as allow_fallback: false 2021-06-18 12:47:41 -04:00
Eli Schwartz d729ea3f69
Revert "Add Chicken-Libraries to Users.md (#8180)"
This reverts commit 72365e6856.

This is a vanity project that no longer exists.

See discussion at #8890, which still requires further thought but we can
at least start off by removing something clearly invalid.
2021-06-17 17:06:53 -04:00
Eli Schwartz 471c05d57d
update gettext test to use new intl dependency
Tests that we find something sensible for intl, capable of producing
binaries using gettext() to translate stuff.

No more need to manually check headers and *maybe* include the intl
library, which we were doing before; the new dependency actually
simplifies the existing test, and should simplify users' build files
too...
2021-06-17 13:22:25 -04:00
Eli Schwartz 2c6ccfe4c4
intl custom dependency
Checking how to aquire the *gettext family of symbols portably is
annoyingly complex, and may come from the libc, or standalone.

builtin dependency:

    This detects if libintl is unneeded, because the *gettext family of
    symbols is available in the libc.

system dependency:

    This detects if libintl is installed as separate software, linkable via
    -lintl; unfortunately, GNU gettext does not ship pkg-config files for
    it.

Fixes #3929
2021-06-17 13:22:25 -04:00
Eli Schwartz ad206037e3
tests: update dependency factory tests to check type_name is sane
Since we pass a method: 'foo' to every one of these
config-tool/pkg-config dependencies, we do not ever need to check which
type_name it has; change these to asserts instead.

In the process, we discover a bug! We kept checking for type
'configtool' instead of 'config-tool', so these tests all
short-circuited and checked nothing. Once moved to an assert, the
asserts failed.

Add a new lookup for a known system dependency and make it assert that
too.
2021-06-17 13:22:25 -04:00
Eli Schwartz bbcc91c1e5
expose SystemDependency and BuiltinDependency as toplevel classes
mesonbuild.dependencies.__init__ exposes configtool, pkgconfig, cmake
and more in __init__.py, so there's no reason we should be tying
SystemDependency to the internal organization implementation of the
subpackage!

In the 2nd previous commit it took quite some effort to figure out that
the python module "does not exist" because of import errors while
refactoring something completely different.
2021-06-17 13:22:25 -04:00
Eli Schwartz d591353b78
add new dependency type "builtin"
For dependencies that on some systems are built into libc etc. and don't
need to be separately linked. This is distinct from "system"
dependencies which add linker args.
2021-06-17 13:22:25 -04:00
Eli Schwartz 493dc6ed10
move base class for system dependencies into base.py
In accordance with review comments; it's small enough this seems fitting.
2021-06-17 13:22:25 -04:00
Xavier Claessens fbeb62101c doc: Add missing modules to dropdown list 2021-06-17 11:28:01 +02:00
Xavier Claessens b6d754a40c interpreter: Extract dependency() logic into its own helper class
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.
2021-06-16 19:04:03 -04:00
Xavier Claessens 3970f269fd Fix assert(not true) raising backtrace
When no message is provided to assert(), it uses the ast printer to show
the condition that failed. In this case the 'not' is the first string
appended to the result, self.result[-1] would raise range error.
2021-06-16 19:04:03 -04:00
Jussi Pakkanen 6fb2f86379
Merge pull request #8822 from dcbaker/submit/annotate-and-check-qt-module
Rewrite the Qt module for type safety!
2021-06-16 20:11:46 +03:00
andy5995 537adce5d8 Users.md: add canfigger library 2021-06-15 14:47:52 -07:00
Dylan Baker 0f5e55a749 docs: Add a page for qt6
Which has been missing since the module was added in 0.57.0.
This also uses the include syntax
2021-06-15 14:15:13 -07:00
Dylan Baker 7535736108 docs: Use an include for the qt modules
Insteadf of qt4 referencing the Qt5 page, include the same content in
both.
2021-06-15 14:15:13 -07:00
Dylan Baker bfaa529a7a modules/qt: sort and clean up dependencies 2021-06-15 12:48:53 -07:00
Dylan Baker 2a8a6bb881 modules/qt: Return GeneratedListHolder instead of GeneratedList
This really shouldn't be necissary, but fixing the typing annotations of
ModuleReturnValue is much harder than just returning the Holder
directly.
2021-06-15 12:48:53 -07:00
Dylan Baker ec48dbd2d6 interpreterobjects: Clean up GeneratedListHolder
Remove an unused method (that didn't work before this series), and
remove the ability to pass a Generator to the GeneratedListHolder, it's
never used and it's weird and not the way Meson generally works now.
While we're here, finish the type annotations.
2021-06-15 12:48:53 -07:00
Dylan Baker a65429d57b build: Fully annotate GeneratedList 2021-06-15 12:48:53 -07:00
Dylan Baker 4e7f59d70d build: Generator add missing annotations 2021-06-15 12:48:53 -07:00
Dylan Baker 0698a50c00 build: cleanup Generator.proccess_files a bit 2021-06-15 12:48:53 -07:00
Dylan Baker c422621317 interpreterobjects|build: use typed_kwargs for generator.process 2021-06-15 12:48:53 -07:00
Dylan Baker 5952dc9818 interpreter|build: use typed_pos_args and unholder in the interpreter
For generator.process_files. Just cleaner and nicer
2021-06-15 12:48:53 -07:00
Dylan Baker 2043461b87 build: Pass name of generator to initializer
It's really a property of the Generator what name to use, not something
that should be passed to each call to process files.
2021-06-15 12:48:53 -07:00
Dylan Baker 35bdaada1d interpreter|build: Do Generator keyword argument checking in the interpreter
For qt we already have all of the necissary checking in place. Now in
the interpreter we have the same, the intrperter does all of the
checking, then passed the arguments to the Generator initializer, which
just assigns the passed values. This is nice, neat, and clean and fixes
the layering violatino between build and interpreter.
2021-06-15 12:48:53 -07:00
Dylan Baker 491c756dc9 interpreter: use typed_kwargs for func_generator
Do the type checking in a nice tidy way
2021-06-15 12:48:53 -07:00