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 plugin prevents from building a single package in workspace #934

Open
artivis opened this issue Dec 12, 2024 · 0 comments
Open

Rust plugin prevents from building a single package in workspace #934

artivis opened this issue Dec 12, 2024 · 0 comments
Labels
Enhancement New feature or request

Comments

@artivis
Copy link
Contributor

artivis commented Dec 12, 2024

What needs to get done

The rust plugin should support building a single (or several) package(s) in a virtual workspace. The cargo build command offers the --package flag to only build a specific package (the flag can be repeated). However it is superseeded by the --workspace flag which effectively instruct to build all packages (not sure if this precedence is a general rule or a positional thing).

Why it needs to get done

While the plugin doesn't explicitely support specifying a package(s), one could abuse the rust_cargo_parameters to stuff e.g. ['--package', 'foo'].
However, the plugin hardcode the --workspace flag and all packages are built regardless of the workaround.

Edit:

Similarly, a workspace definition may contain the default-members entry. It defines the members of a virtual workspace that should be built in case neither --workspace nor --package are specified.
If default-members isn't specified either, the fallback is to build all (--workspace). So the hardcoded flag could probably be removed altogether from the plugin.

Source: The cargo book.

@artivis artivis added the Enhancement New feature or request label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant