Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust: Make dependencies visible #18684

Merged
merged 4 commits into from
Mar 26, 2024

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Oct 3, 2022

Contribution description

The Cargo.lock of rust_riotmodules_standalone should explicitly list all
versions of software that would ever be pulled in by enabling RIOT
modules backed by a Rust crate. This did not happen before, because
while the optional dependencies could all be selected on the command
line, they were not visible as possible features to cargo update, and
were thus not encoded in the Cargo.lock file.

Testing procedure

CI is probably good enough, but to understand what it does, look at cargo tree --all-features in sys/rust_riotmodules_standalone before and after -- and compare those with the output of make in tests/rust_libs. You will see that before, cargo tree -all-features did not show the lsm303agr crate as a listed dependency, even though the make output clearly illustrates that it is being pulled in. After, all crates used will also be shown in cargo tree.

These cargo tree outputs also align with the content of the Cargo.lock files before and after.

Issues/PRs references

This should probably have been done right in #16833 -- sorry for the oversight.

This PR is built on #18683 -- so while that's not in, please ignore the first commit.

@chrysn chrysn added Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: Rust Area: Rust wrapper labels Oct 3, 2022
@github-actions github-actions bot added Area: drivers Area: Device drivers Area: examples Area: Example Applications Area: sys Area: System Area: tests Area: tests and testing framework and removed Area: build system Area: Build system labels Oct 3, 2022
@riot-ci
Copy link

riot-ci commented Oct 3, 2022

Murdock results

✔️ PASSED

a5c9ac2 rust: Make dependencies visible

Success Failures Total Runtime
10009 0 10009 10m:18s

Artifacts

@Teufelchen1
Copy link
Contributor

Is this still relevant?

Changes pulled by this are:
* add hashes to riot-sys headers <RIOT-OS/rust-riot-sys#43>
* administrative changes (riot-sys 0.7.11, CI fixes)
All changes appear to be minor; some crates that were previously part of
the build dependencies twice can now be shared between build
dependencies.
Changes pulled by this are:
* optimizations around panicking <RIOT-OS/rust-riot-wrappers#82>
* administrative changes (CI fixes)
@github-actions github-actions bot removed Area: tests Area: tests and testing framework Area: drivers Area: Device drivers Area: examples Area: Example Applications labels Mar 20, 2024
@chrysn
Copy link
Member Author

chrysn commented Mar 20, 2024

It still is, and I completely forgot about it. Thanks for pinging me -- it is now rebased (with only one commit left because master is sufficiently up to date).

Unless anything happens in CI, this should be good to go.

@github-actions github-actions bot added Area: network Area: Networking Area: tests Area: tests and testing framework Area: CoAP Area: Constrained Application Protocol implementations Area: examples Area: Example Applications labels Mar 20, 2024
The Cargo.lock of rust_riotmodules_standalone should explicitly list all
versions of software that would ever be pulled in by enabling RIOT
modules backed by a Rust crate. That way, the Cargo.lock file will not
spontaneously change because the software is being built with a
different set of modules enabled.

This did not happen before, because while the optional dependencies
could all be selected on the command line, they were not visible as
possible features to `cargo update`, and were thus not encoded in the
Cargo.lock file.
@github-actions github-actions bot removed Area: network Area: Networking Area: CoAP Area: Constrained Application Protocol implementations labels Mar 20, 2024
@chrysn
Copy link
Member Author

chrysn commented Mar 20, 2024

... and force pushed because this would have conflicted with #20489 that is already in the merge queue. (So, ignore the first 3 commits; by the time this gets merged, only the latest commit should be new relative to master.)

@Teufelchen1 Teufelchen1 added this pull request to the merge queue Mar 26, 2024
@MrKevinWeiss MrKevinWeiss removed this pull request from the merge queue due to a manual request Mar 26, 2024
@MrKevinWeiss MrKevinWeiss added this pull request to the merge queue Mar 26, 2024
@MrKevinWeiss MrKevinWeiss removed this pull request from the merge queue due to a manual request Mar 26, 2024
@MrKevinWeiss
Copy link
Contributor

Sorry, #20438 will never get in if every merge conflicts and kicks it out. I will requeue when ready.

@MrKevinWeiss MrKevinWeiss added this pull request to the merge queue Mar 26, 2024
@chrysn
Copy link
Member Author

chrysn commented Mar 26, 2024 via email

Merged via the queue into RIOT-OS:master with commit 29a756b Mar 26, 2024
26 checks passed
@chrysn chrysn deleted the rust-easier-updates branch March 27, 2024 15:01
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: examples Area: Example Applications Area: Rust Area: Rust wrapper Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants