Skip to content

Commit

Permalink
cargo: Document that cargo subprojects is an experimental feature
Browse files Browse the repository at this point in the history
  • Loading branch information
xclaesse committed Oct 11, 2024
1 parent 91fc9e7 commit afe3bb3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/markdown/Wrap-dependency-system-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ foo-bar-1.0 = foo_bar_dep
```
### Cargo wraps

*This is experimental and has no backwards or forwards compatibility guarantees.*

Cargo subprojects automatically override the `<package_name>-<version>-rs` dependency
name:
- `package_name` is defined in `[package] name = ...` section of the `Cargo.toml`.
Expand Down
6 changes: 6 additions & 0 deletions docs/markdown/snippets/cargo_exp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## 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 feature and future releases might do breaking
changes.
2 changes: 2 additions & 0 deletions mesonbuild/interpreter/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,8 @@ def _do_subproject_cargo(self, subp_name: str, subdir: str,
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)
Expand Down

0 comments on commit afe3bb3

Please sign in to comment.