8000 Rust check features and packages parameters by garryod-oxionics · Pull Request #81 · OxIonics/common-workflows · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rust check features and packages parameters #81

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

Open
wants to merge 5 commits into
base: v3
Choose a base branch
from

Conversation

garryod-oxionics
Copy link
Contributor
@garryod-oxionics garryod-oxionics commented Mar 4, 2025

Adds FEATURES and PACKAGES inputs to the rust-check workflow to support the oddities of bozu, also removes the FMT_TOOLCHAIN input which was unused (making it a breaking change). Not too happy about duplicating the Generate Flags step, but moving it into it's own job felt even worse

@garryod-oxionics garryod-oxionics self-assigned this Mar 4, 2025
@garryod-oxionics garryod-oxionics force-pushed the rust-features-and-parameters branch 12 times, most recently from a69b16a to 919911a Compare March 5, 2025 10:19
@garryod-oxionics garryod-oxionics marked this pull request as ready for review March 5, 2025 10:24
@garryod-oxionics garryod-oxionics requested a review from a team March 5, 2025 10:25
Copy link
Collaborator
@mbirtwell mbirtwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if instead of fixing this here, we should fix this in poe test-rs.

If we had something like:

test-bozu-default = "cargo test --all-features"
test-bozu-funny-
test-bozu-funny-two = "cargo test --package funny_two --feature two"
test-rs = ["test-bozu-default", "test-bozu-funny-one", "test-bozy-funny-two"]

(apologies I can't be bothered to look up the details of the funnyness)

Then poe test-rs would run the three different test commands and we'd also have poe test-bozu-default etc. commands available locally if we wanted them.

@mbirtwell
Copy link
Collaborator

Ah I see my suggestion would work well for test but would have to replicated for clippy. Is it nicer to centralise that here? I'm not sure I still like the idea of being able to run the commands that CI would run locally more easily. Which my suggestion achieves.

@garryod-oxionics garryod-oxionics force-pushed the rust-features-and-parameters branch from 919911a to acbb81f Compare March 5, 2025 13:30
@garryod-oxionics
Copy link
Contributor Author
garryod-oxionics commented Mar 5, 2025

Ah I see my suggestion would work well for test but would have to replicated for clippy. Is it nicer to centralise that here? I'm not sure I still like the idea of being able to run the commands that CI would run locally more easily. Which my suggestion achieves.

Definitely a fan of having an easy way of running the same tests both locally and in CI, though my approach to this in the past has been to use the local github workflows runner act. Either way, I think it'd make sense to have parity between cargo fmt, cargo test, and cargo clippy - i.e. all defined in POE or GH actions

@garryod-oxionics garryod-oxionics force-pushed the rust-features-and-parameters branch from acbb81f to b64098c Compare March 5, 2025 14:00
@mbirtwell
Copy link
Collaborator

I've not used act before, it seems like it might be a bit heavy compared with poe. I agree we should have parity between the different cargo actions. I have a slight preference for using poe for this mostly on the basis that I think that's the expectation, but I'm not overly wedded to it. If you want to push act it might be worth discussing with the rest of the team though.

@garryod-oxionics
Copy link
Contributor Author
garryod-oxionics commented Mar 5, 2025

poe seems like a good call for now - though you'll probably hear more about act in the near(ish) future. This is a breaking change so I'll take a dig through the repos which use this workflow and see if they need to have a test-rs script defined in their poe.tasks before we merge this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0