aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-07tests/rust: Add a test for structured inputsDylan Baker13-0/+139
2022-03-07backends/ninja: Add support for structured sources with rustDylan Baker1-0/+43
2022-03-07build: plumb structured sources into BuildTargetsDylan Baker6-35/+105
2022-03-07interpreter: add an implementation for structured_sourcesDylan Baker3-0/+28
2022-03-07interpreter: Add a holder for StructuredSourcesDylan Baker2-0/+7
And teach the interpreter how to use it
2022-03-07interpreter: teach source_strings_to_files about StructuredSourcesDylan Baker1-1/+1
2022-03-07dependencies: Dependency Sources can be StructuredSourcesDylan Baker1-3/+6
2022-03-07build: Add structured sourcesDylan Baker1-0/+55
2022-03-07backend/ninja: add rules to copy files to the build dirDylan Baker1-0/+12
2022-03-07scripts: Add a script to copy files.Dylan Baker1-0/+18
2022-03-07build: fix typo in type aliasDylan Baker1-1/+1
The declaration is `EnvInitValueType`, but when it's used it's `EnvValueType`.
2022-03-07build: fix type annotation issueDylan Baker1-1/+1
I noticed by inspection
2022-03-07mesonlib: Add a from_node initializer to MesonExceptionDylan Baker1-0/+10
This is useful when creating an exception with a node option, with less typing.
2022-03-07Fix mypy CI.Jussi Pakkanen1-1/+1
2022-03-07Merge pull request #10043 from dcbaker/submit/type-checking-for-subprojectJussi Pakkanen11-115/+194
Add typing for subproject()
2022-03-07Fix default install tag for shared lib symlinksXavier Claessens7-28/+65
Versioned shared libraries should have .so file in devel, .so.1 and .so.1.2.3 in runtime. Fixes: #9811
2022-03-07Merge pull request #9743 from mensinda/cmakeGeneratorFixedJussi Pakkanen8-9/+149
cmake: Add TARGET_ generator expression support (fixes #9305)
2022-03-06find_program: add a version() method to match the one for dependenciesEli Schwartz4-0/+28
It is often useful to check the found version of a program without checking whether you can successfully find `find_program('foo', required: false, version: '>=XXX')`
2022-03-06i18n.merge_file: do not disable in the absence of gettext toolsEli Schwartz2-4/+16
Disabling targets because the tools used to build them aren't available is a pretty suspicious thing to do. Users who want this are probably, in general, advised to check themselves whether it is possible to build those targets with find_program(..., required: false) The i18n.gettext() invocation is a bit unusual because the product of running it is non-critical files, specifically, translation catalogs. If users don't have the tools needed to build them, they may not be able to use them either, because perhaps they have NLS disabled on their platform or it's difficult to put it in the bootstrap path. So, for this reason, it was made non-fatal and the message catalogs are just not created, and the resulting build is still perfectly usable *unless* you want to use it in another language, at which point it "works" but the text is all inscrutable to the end user, and that's a feature of the target platform. That's an acceptable tradeoff for translation catalogs. It is NOT an acceptable tradeoff for merge_file, which produces desktop files or MIME database catalogs or other files which have crucial roles to perform, without which the software in question simply doesn't work at all. In such cases, this just fails to install crucial files, users report bugs to the project in question, and the project adds `find_program('xgettext')` to guarantee the hard error due to lack of confidence in Meson. Fixes #6165 Fixes #8436
2022-03-06i18n module: report initial call site when disabling translation supportEli Schwartz1-4/+5
2022-03-06i18n module: detect gettext tools at configure timeEli Schwartz1-13/+27
Use this instead of shutil.which to detect whether they will be available, and pass the ExternalProgram object to CustomTarget invocations, or else make use of the new functionality to specify the correct program path in wrapper scripts. Drop duplicate reporting for itstool missing. Since we use find_program in required mode, its absence is already fatal, and already has a really good error description.
2022-03-06scripts: accept the path of the gettext commands to run as an argumentEli Schwartz3-11/+18
Don't assume itstool, msgfmt et al. are just magically on the path. Normally for commands being processed in build.ninja we'd look up the program in order to run it. Offer the same guarantee for programs being passed through an awkward script wrapper.
2022-03-06i18n module: fix bug that made msgfmthelper die on combinations of argsEli Schwartz3-2/+3
Due to misuse of argparse in commit 82492f5d765b70cc87385fb887008df89fac878e it was impossible to use both --datadirs and extra args passed directly to msgfmt at the same time. I'm not sure anyone actually knows how argparse works, so misusing it is easy. What is definitely known is that argparse is NOT a POSIX compliant parser and doesn't behave the way you'd expect a standards based parser to handle options. Instead it caters to the easy use case, and hopes and prays you don't need to do anything too complicated "with the wrong kind of complicated". Apparently, this particular type of complicated is when you have mixed option_arguments and operands while simultaneously passing some operands as nargs after a --. It totally breaks, and interprets --datadirs, which is supposed to be an option_argument, as an operand, eats it up as a msgfmt wrapped argument, and breaks. But if you don't pass additional arguments with -- then it interprets --datadirs after operands as an option_argument. This is what we were doing. Instead pass option_arguments before all operands (including the ones specified via `-- ...`). Add test case to pass meaningless datadirs (we don't actually care if $GETTEXTDATADIRS is set to something that doesn't contain gettext data).
2022-03-06wayland module: Allow building both client and server sidesXavier Claessens11-67/+95
- Change `scope` kwarg to `public` boolean default to false. - Change `side` kwarg to `client` and `server` booleans. - Document returned values - Aggregate in a single unit test because have lots of small tests increases CI time. Fixes: #10040.
2022-03-04[skip ci] fix syntax typoDarren Ng1-1/+1
2022-03-04Port JavaModule to NewExtensionModule APITristan Partin1-18/+25
2022-03-04Fix @typed_pos args on java.generate_native_headerTristan Partin1-2/+1
2022-03-04Add modules kwarg to JNI system depTristan Partin4-7/+83
This allows someone to link against libjvm.so and libjawt.so.
2022-03-03CI images: add the JRE to UbuntuEli Schwartz2-0/+2
This is needed in order to test a pending improvement to the jni dependency in #10048.
2022-03-03interpreter: annotate the find_program chainDylan Baker2-13/+22
2022-03-03interpreter: fix some low hanging type annotations issuesDylan Baker1-21/+22
2022-03-03interpreter: fix mismatched type expectationsDylan Baker2-3/+3
2022-03-03interpreter: Fix type violation in do_subproject_cmakeDylan Baker1-1/+1
2022-03-03interpreter: replace build_def_files with OrderedSetDylan Baker4-12/+11
We do a bunch of backbending to make sure we don't have duplicates, let's just use the right datastructure to begin with.
2022-03-03build: Add a couple of type annotations for the Interpreter to useDylan Baker1-2/+2
2022-03-03interpreter: fix Interpreter type annotationsDylan Baker1-1/+1
default_options should be `T.Dict[OptionKey, str]`, not `T.Dict[str, str]`.
2022-03-03interpreter: add cm_interpreter to SubprojectHolderDylan Baker2-4/+8
This is used in the cmake module, as an extra attribute we just tack on. Instead, let's actually define and type it.
2022-03-03interpreter: use typed_kwargs for subproject()Dylan Baker6-25/+67
2022-03-03interpreter: add some simple annotations to subproject methodsDylan Baker1-2/+3
2022-03-03interpreter: Use a literal for the do_subproject helperDylan Baker1-1/+3
Since we only have two valid options and we don't want to allow any others.
2022-03-03interpreter: annotate subproject_stackDylan Baker1-1/+1
2022-03-03interpreter/dependencyfallbacks: fix a number of low hanging type issuesDylan Baker1-8/+10
2022-03-03coredata: fix annotations of get_optionDylan Baker1-1/+1
2022-03-03modules/cmake: add type annotations for subproject methodDylan Baker2-27/+46
This will be used to handle the interpreter subproject as well
2022-03-03add release snippet for declare_dependencyRemi Thebault1-0/+14
2022-03-03ignore dub.json in test "d/11 dub"Remi Thebault1-0/+1
2022-03-03Document D features in `declare_dependency`Remi Thebault1-0/+17
2022-03-03add test d/13 declare depRemi Thebault3-0/+29
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