cargo: Document that cargo subprojects is an experimental feature

pull/9689/merge
Xavier Claessens 1 year ago committed by Xavier Claessens
parent 842504d614
commit 304207b9d2
  1. 6
      docs/markdown/Wrap-dependency-system-manual.md
  2. 8
      docs/markdown/snippets/cargo_exp.md
  3. 2
      mesonbuild/interpreter/interpreter.py

@ -297,6 +297,9 @@ fallback to use the subproject, assuming it uses
### CMake wraps
**Note**: This is experimental and has no backwards or forwards compatibility guarantees.
See [Meson's rules on mixing build systems](Mixing-build-systems.md).
Since the CMake module does not know the public name of the provided
dependencies, a CMake `.wrap` file cannot use the `dependency_names = foo`
syntax. Instead, the `dep_name = <target_name>_dep` syntax should be used, where
@ -316,6 +319,9 @@ foo-bar-1.0 = foo_bar_dep
```
### Cargo wraps
**Note**: This is experimental and has no backwards or forwards compatibility guarantees.
See [Meson's rules on mixing build systems](Mixing-build-systems.md).
Cargo subprojects automatically override the `<package_name>-<version>-rs` dependency
name:
- `package_name` is defined in `[package] name = ...` section of the `Cargo.toml`.

@ -0,0 +1,8 @@
## Cargo subprojects is experimental
Cargo subprojects was intended to be experimental with no stability guarantees.
That notice was unfortunately missing from documentation. Meson will now start
warning about usage of experimental features and future releases might do breaking
changes.
This is aligned with our general policy regarding [mixing build systems](Mixing-build-systems.md).

@ -1043,6 +1043,8 @@ class Interpreter(InterpreterBase, HoldableObject):
kwargs: kwtypes.DoSubproject) -> SubprojectHolder:
from .. import cargo
FeatureNew.single_use('Cargo subproject', '1.3.0', self.subproject, location=self.current_node)
mlog.warning('Cargo subproject is an experimental feature and has no backwards compatibility guarantees.',
once=True, location=self.current_node)
with mlog.nested(subp_name):
ast, options = cargo.interpret(subp_name, subdir, self.environment)
self.coredata.update_project_options(options, subp_name)

Loading…
Cancel
Save