summaryrefslogtreecommitdiff
path: root/test cases/unit
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-01-17 18:05:12 -0500
committerEli Schwartz <eschwartz@archlinux.org>2023-06-26 13:10:32 -0400
commitc82305db0c5216f821e43bfc7ea3c8e314d0dccd (patch)
tree2b294904907ee546b34f2180d49cce32dd5a2e58 /test cases/unit
parentc780d240e2f0a557eab0459a63e6936ff37615d1 (diff)
downloadmeson-c82305db0c5216f821e43bfc7ea3c8e314d0dccd.tar.gz
dependencies: delay often-unused imports
We expose detect.py as the mesonbuild.dependencies entrypoint and import it upfront everywhere. But unless the `dependency()` function is actually invoked, we don't need *any* of the private implementations for this. Avoid doing so until, as part of actual dependency lookup, we attempt that specific dependency method. This avoids importing big modules if `method:` is specified, and in most cases hopefully pkg-config works and we can avoid importing the cmake implementation particularly. Actually avoiding most of these imports requires more refactoring. But even so, the garden path no longer needs to import the dub dependency impl.
Diffstat (limited to 'test cases/unit')
-rw-r--r--test cases/unit/113 empty project/expected_mods.json3
1 files changed, 1 insertions, 2 deletions
diff --git a/test cases/unit/113 empty project/expected_mods.json b/test cases/unit/113 empty project/expected_mods.json
index 2e7c2892a..9ad84d482 100644
--- a/test cases/unit/113 empty project/expected_mods.json
+++ b/test cases/unit/113 empty project/expected_mods.json
@@ -208,7 +208,6 @@
"mesonbuild.dependencies.cuda",
"mesonbuild.dependencies.detect",
"mesonbuild.dependencies.dev",
- "mesonbuild.dependencies.dub",
"mesonbuild.dependencies.factory",
"mesonbuild.dependencies.framework",
"mesonbuild.dependencies.hdf5",
@@ -272,6 +271,6 @@
"mesonbuild.wrap",
"mesonbuild.wrap.wrap"
],
- "count": 98
+ "count": 97
}
}