In large monolithic codebases with many intertwined shared libraries, test
serialization can cause configuration times to balloon massively from a single
test() invocation due to concatenating the same paths many times over.
This commit adds an initial set in which all dependencies on a test target are
stored before their paths are constructed to form the test target's
LD_LIB_PATH. In testing on a particularly large codebase, this commit reduced
total configuration time by a factor of almost 8x.
When configuring a 'meson' or 'cmake@' style file,
add a case for escaped variables using matched pairs of
`\@` i.e. `\@foo\@ -> @foo@`.
The match for @var@ has been amended with a negative lookbehind
to ensure that any occurrances of `\@foo@` are not evaluated to
`\bar`.
The previous behaviour, matching `\@` and escaping only that character,
had undesirable side effects including mangling valid perl when
configuring files.
Closes: https://github.com/mesonbuild/meson/issues/7165
This fixes the unit test `TestAllPlatformTests.test_noop_changes_cause_no_rebuilds`,
when run with an `nm` binary from `cctools-port` (as shipped by conda-forge, see
https://github.com/conda-forge/cctools-and-ld64-feedstock).
It also addresses the issue discussed in https://github.com/mesonbuild/meson/discussions/11131,
and this build warning:
```
[48/1383] Generating symbol file scipy/special/libsf_error_state.dylib.p/libsf_error_state.dylib.symbols
WARNING: ['arm64-apple-darwin20.0.0-nm'] does not work. Relinking will always happen on source changes.
error: arm64-apple-darwin20.0.0-nm: invalid argument --
```
as reported in scipy#20740.
The unit test traceback was:
```
> self.assertBuildRelinkedOnlyTarget('mylib')
E AssertionError: Lists differ: ['mylib', 'prog'] != ['mylib']
E
E First list contains 1 additional elements.
E First extra element 1:
E 'prog'
E
E - ['mylib', 'prog']
E + ['mylib']
unittests/allplatformstests.py:1292: AssertionError
```
The `nm` shipped by Apple yields the exact same results either way; the man page for `nm`
only lists the single-character form so this seems preferred either way.
Cargo.lock is essentially identical to subprojects/*.wrap files. When a
(sub)project has a Cargo.lock file this allows automatic fallback for
its cargo dependencies.
The Python Limited API support that was added in 1.2 had
special handling of Windows, but the condition to check for
Windows was not correct: it checked for MSVC and not for
the target's OS. This causes mingw installations to not have
the special handling applied.
This commit fixes this to check explicitly for Windows.
This is in preparation for a future commit which makes it
possible for a PythonPkgConfigDependency to be used in a
context where previously only a PythonSystemDependency would
be used.
Based on the example in GH issue #13167, the limited API test has been
extended with a test to load the compiled module to ensure it can be
loaded correctly.
New people that want to use Meson for building Python extensions most
probably will read Python module docs first. Direct them to meson-python
and suggest to set `python.install_env=auto`.
Instead of invoking javac for every .java file, pass all of the sources
for a jar target to a single javac invocation. This massively improves
first compilation time and doesn't meaningfully affect incremental builds
(it can even be faster in some cases).
The old approach also had issues where files would not always get recompiled
even though they should, necessitating a clean rebuild in order to see changes
reflected in the build output.
Multiple invocations seem to only make sense if:
- issues with files not getting flagged for rebuild are investigated and fixed
- something like the javaserver buildtool from openjdk sources is used
instead of directly spawning javac processes
- the amount of java files per jar is so large that it is faster to compile
several files one by one than to compile all the files at once (batching may
still make sense to get a reasonable balance)
From python 3.11 [1]:
> The entry in the netrc file no longer needs to contain all tokens. The missing
> tokens' value default to an empty string. All the tokens and their values now
> can contain arbitrary characters, like whitespace and non-ASCII characters.
> If the login name is anonymous, it won't trigger the security check.
[1] 15409c720b
It started failing CI as soon as the default shifted to 1.78. Something
is broken and it prevents running stable CI. Tracking issue opened.
We pin the version because that is the same way we handle CI for linux
-- with the exception that Linux CI can upgrade itself as soon as we
fix issues causing the CI Image Builder to jam itself, whereas
unfortunately Windows will need to be manually unpinned, but such is
life as a Windows supporter.
Bug: #13236
Some settings require "objectVersion" to be set to a certain value or
Xcode will not use it. To fix this, we set it to the highest possible
value, determined by the detected version of Xcode. We also set
"compatibilityVersion", but mainly so it lines up with "objectVersion".
At the same time, we should not be generating Xcode 3.2-compatible
projects by default anyway.