aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-03add D features to InternalDependencyRemi Thebault5-12/+29
2022-03-02document and raise an error for disallowed combination of install_headers argsEli Schwartz2-4/+10
It makes no sense to specify both: - install_dir, which overrides the -Dincludedir= builtin option - subdir, which suffixes the -Dincludedir= builtin option We've always silently ignored the subdir in this case, which is really surprising if someone actually passed it and expected it to do something. We also confusingly didn't say anything in the documentation about it. Document that the options are incompatible, and explicitly check to see if they are both passed -- if so, raise an error message pointing out that only install_dir should be used. Fixes #10046
2022-03-02Rename JDK system dep to JNITristan Partin15-64/+100
JNI is a more apt name because it currently only supports the JNI. I also believe that CMake uses the terminology JNI here as well. JNI is currently the only way to interact with the JVM through native code, but there is a project called "Project Panama" which aims to be another way for native code to interact with the JVM.
2022-03-02compilers/gnu: set level 0 optimization to '-O0'Dylan Baker1-1/+1
GCC with optimization set to 0 does not actually result in no optimizations, which can be annoying when trying to use a debugger like gdb, and finding that your variable has been optimized out. We already do this with clang, so gcc is a bit of an outlier here.
2022-03-01fix missing encodingsEli Schwartz2-1/+7
These were caught by the testsuite erroring out with a fatal EncodingWarning due to the previous commit. Fixes #9996
2022-03-01use a more sane check instead of run_custom_lintEli Schwartz5-86/+13
Unfortunately, checking for strings without context is exceedingly prone to false positives, while missing anything that indirectly opens a file. Python 3.10 has a feature to warn about this though -- and it uses a runtime check which runs at the same time that the code fails to open files in the broken Windows locale. Set this up automatically when running the testsuite. Sadly, Python's builtin feature to change the warning level, e.g. by setting EncodingWarning to error at startup, is utterly broken if you want to limit it to only certain modules. This is tracked in order to be more efficiently ignored at https://bugs.python.org/issue34624 and https://github.com/python/cpython/pull/9358 It is also very trigger happy and passing stuff around via environment variable either messes with the testsuite, or with thirdparty programs which are implemented in python *such as lots of gnome*, or perhaps both. Instead, add runtime code to meson itself, to add a hidden "feature". In the application source code, running the 'warnings' module, you can actually get the expected behavior that $PYTHONWARNINGS doesn't have. So check for a magic testsuite variable every time meson starts up, and if it does, then go ahead and initialize a warnings filter that makes EncodingWarning fatal, but *only* when triggered via Meson and not arbitrary subprocess scripts.
2022-03-01compilers/d: fix mangling of rpath-link in DMD-like compilersEli Schwartz1-1/+1
We didn't consider that it has arguments following it, so the resulting compiler command line ended up with stuff like: -L=-rpath-link -L=-L=/path/to/directory -L=more-args and the directory for rpath-link got eaten up as a regular -L path to the compiler rather than being passed as -Xlinker to the linker. Then the -rpath-link would consume the next -Xlinker argument, end up with the wrong rpath-link (may or may not cause link errors) and then disappear arguments we need. As an example failure mode, if the next argument is -soname this treats the soname text as an input file, which probably does not exist if it was generated in a subdirectory, and also because it can never be successfully built in the first place -- though if it did, it would link to itself which is very wrong.
2022-03-01Deprecate java.generate_native_header() in favor of ↔Tristan Partin5-6/+127
java.generate_native_headers() After implementing a much more extensive Java native module than what currently exists in the tests, I found shortcomings. 1. You need to be able to pass multiple Java files. 2. Meson needs more information to better track the generated native headers. 3. Meson wasn't tracking the header files generated from inner classes. This new function should fix all the issues the old function had with room to grow should more functionality need to be added. What I implemented here in this new function is essentially what I have done in the Heterogeneous-Memory Storage Engine's Java bindings.
2022-03-01mesonlib: use Literal to tighten configure_file formatsDylan Baker1-14/+17
Now that we have strong type checking in the interpreter, we can tighten the type checking in the mesonlib side by using the same Literals.
2022-03-01interpreter: delete now unnecessary codeDylan Baker1-5/+0
Only func_configure_file could reach this code, but now it cannot due to the use of typed_kwargs, so delete it.
2022-03-01interpreter: use typed_kwargs for configure_fileDylan Baker2-79/+82
2022-03-01interpreter: use a shared KwargInfo for install_tagDylan Baker2-3/+6
The kind that takes a single argument, not the custom_target version that takes an array
2022-03-01interpreter: fix notfound_program methodDylan Baker1-2/+4
Which should take a File or str, but only handles str correctly. Which mypy would have caught for us, if we just had annotations here.
2022-03-01build: Add a `__bool__` dunder to ConfigurationDataDylan Baker1-0/+3
Which will be used by the `configure_file` method of the interpreter.
2022-03-01cheat and evade the detection of "open()" in custom_lintEli Schwartz1-6/+6
It's a dumb check which doesn't know the difference between python functions and string data. Work around this by changing the message output to not include an opening parenthesis, and changing other similar strings the same way for consistency.
2022-03-01mark a bunch of dependencies with the version they were introducedEli Schwartz2-0/+7
All these dependencies are impossible to find on versions of Meson older than the ones they got custom lookups in, because they don't provide pkg-config files. So they should not / cannot be reasonably used on older versions, and it is easy to say "yep, these should emit a FeatureNew for the versions they got added in".
2022-03-01allow dependency checks to bubble up feature warnings to the interpreterEli Schwartz2-0/+8
It would be too difficult and probably a layering violation to give an interpreter handle to the inner guts of every dependency. What we can do instead is let every dependency track: - the Feature checks it can produce, - the version attribute for when it was implemented while leaving the interpreter in charge of actually emitting them.
2022-03-01clean up FeatureCheck signature to move location to use timeEli Schwartz3-17/+15
The point of a .use() function is because we don't always have the information we need to use a feature check, so we allow creating the feature and then storing it for later use. When implementing location checks, although it is optional, actually using it violated that design. Move the location out of the init method for FeatureCheck itself. It remains compatible with all cases of .single_use(), but fix the rest up.
2022-03-01remove useless kwarg that was never usedEli Schwartz1-2/+1
I am not sure why it ever got added. It looks superficially similar to FeatureCheck itself, but doesn't need to.
2022-02-28Allow setting method/separator in environment() and meson.add_devenv()Xavier Claessens10-30/+131
2022-02-28devenv: Do not prepend empty list to PATH and LD_LIBRARY_PATHXavier Claessens1-7/+9
2022-02-28devenv: Add --dump optionXavier Claessens3-11/+33
It prints all envorinmente variables that have been modified. Can be used by shell scripts that wish to setup their environment themself.
2022-02-28devenv: Setup GDB auto-load scriptsXavier Claessens3-2/+65
When the project instals GDB helper scripts, copy them into meson-private directory with the right tree layout and write a .gdbinit script to load them automatically.
2022-02-28devenv: Source bash completion scriptsXavier Claessens4-15/+47
2022-02-28devenv: Set PYTHONPATH where we install python modulesXavier Claessens8-7/+94
2022-02-28Add API for modules that wants to define their devenvXavier Claessens3-2/+15
2022-02-28modules: Make ExtensionModule inherit from NewExtensionModuleXavier Claessens1-22/+7
It reduces duplicated code.
2022-02-28backends: Cache creation of install dataXavier Claessens1-0/+1
It is created twice for ninja and for introspection.
2022-02-28Cache the result of python.find_installation()Xavier Claessens1-29/+34
This avoids running sanity checks everytime find_installation() is called.
2022-02-28doc: Fix spelling developper->developerXavier Claessens1-1/+1
Mistaken from French développeur.
2022-02-28Add missing install_tag kwarg to install_emptydir()Christian Wendt1-2/+3
2022-02-28Change jar() default install dirTristan Partin3-0/+12
The previous install dir seemed incorrect when looking at various Linux distributions.
2022-02-28docs: correct the shaderc documentationDudemanguy1-5/+11
The documentation on how shaderc is checked in meson was quite behind. Update it to mention that pkg-config is the default and preferred method of checking. Also be specific about what order everything is checked in since shaderc is confusing.
2022-02-27wraptool: report name of wrap in status message for "not in wrapdb"Eli Schwartz1-1/+1
2022-02-27wraptool: be forgiving of local wrap filesEli Schwartz1-9/+22
Do not traceback when trying to update a wrap that isn't a [wrap-file], just report the problem. Do not traceback on perfectly valid WrapDB wraps that don't have a patch_url because they have upstream meson.build, instead try to parse the version from the source tarball filename.
2022-02-27sourceset module: fix minor regression in making sourcesets immutableEli Schwartz1-1/+1
In commit c0be7e05b070d85b38c79088df882970a5cd0279 the setting of merged sourcesets as immutable in a loop accidentally got dedented, and only applied to the last loop iteration.
2022-02-27Merge pull request #10004 from bonzini/mtest-tap-stderrJussi Pakkanen1-8/+9
mtest: print stderr of TAP/Rust tests in verbose/non-parallel mode
2022-02-27test cases/vala: Fix test 14Mark Bolhuis1-1/+1
2022-02-27modules/wayland: Add unstable_wayland moduleMark Bolhuis18-5/+283
2022-02-27cmake: configure_package_config_file can now take a dictAndrea Pappacoda4-5/+12
2022-02-27cmake: typed_kwargs for configure_package_config_fileAndrea Pappacoda1-24/+26
2022-02-23run_mypy: add sourceset moduleDylan Baker2-3/+4
2022-02-23modules/sourceset: Fix remaining typing issuesDylan Baker1-30/+45
2022-02-23mesonlib: allow check_dirent_issues to take an iterableDylan Baker1-2/+2
There's no reason it needs a concrete list, any iterable is fine. This does mean that we need to explicitly check for `str | bytes` in the listify pass, as `str` and `bytes` are both iterable.
2022-02-23modules/sourceset: use typed_kwargs for all functionsDylan Baker1-45/+97
removing permittedKwargs usage
2022-02-23modules/sourceset: Use typed_pos_argsDylan Baker1-13/+27
2022-02-23modules/sourceset: add a few super easy type annotationsDylan Baker1-13/+20
2022-02-23modules/sourceset: sort importsDylan Baker1-3/+4
2022-02-22python module: add option to specify a python environment to install toEli Schwartz4-4/+48
The default behavior of installing relative to prefix may be unexpected, and is definitely wrong in many cases. Give users control in order to specify that yes, they actually want to install to a venv. This is particularly useful for projects that use meson as a build system for a python module, where *all* files shall be installed into the python site-packages.
2022-02-22modules: add ModuleState API to check whether an option was user-specifiedEli Schwartz1-0/+7
Needed to check exclusivity of module options.