-
Notifications
You must be signed in to change notification settings - Fork 11
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
Simplify lint crates build to a single cargo build
invocation
#250
base: master
Are you sure you want to change the base?
Simplify lint crates build to a single cargo build
invocation
#250
Conversation
`cargo build` can be specified to build the dependent crates only. It means we can use the build workspace to both fetch and build the lint crate dlls with a single `cargo build` command. So instead of ```bash cargo fetch cargo metadata cargo build --manifest-path /path/to/lint-crate/a/Cargo.toml cargo build --manifest-path /path/to/lint-crate/b/Cargo.toml ``` We have just ```bash cargo build -p a -p b ``` This also removes the usage of the unstable `--out-dir` parameter for `cargo build`.
e03bc41
to
072e308
Compare
It's a shame, that Cargo's metadata doesn't include the build artifacts and their names. Here is another idea, which might be worth checking out: Cargo has a Set [lib]
+ name = "cool"
crate-type = ["cdylib"] Run
Parsing |
I think using But.. I suppose we will actually need multi- |
Yes, I came up with the idea in that context, but the flag might be usable for dependencies as well. I assume that it can modify everything |
There is a problem with the |
Yeah, the ability to request this information is sadly quite limited 😕 I might have two ideas:
|
cargo build
can be specified to build the dependent crates only. It means we can use the build workspace to both fetch and build the lint crate dlls with a singlecargo build
command.So instead of
We have just
And then we pick the DLLs from the generated artifacts metadata.
This also removes the usage of the unstable
--out-dir
parameter forcargo build
.Draft
I need to fix the integration with
--message-format json
to discover the compiled artifacts. The problem space here is to match the package ID of the lint crates with the package ID of the compiler artifacts reports