-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Allow loading plugins into dependencies #1579
Comments
I haven't read enough of the cargo source, but I gather it would be most useful to add a config parameter to profiles, e.g.
So the |
Cargo is currently very specifically avoiding all |
It's not only theoretically useful – I very practically want to a) lint my code on test and b) test my lints on other code. And I'd prefer to use a cargo option instead of putting @alexcrichton I'd like to hear a bit more about your objection to this feature. Is it that you fear misuse (we obviously should check the supplied plugin list to see if they are available, so that would rule out tricks to bring in other flags here)? Or is there another rationale that I haven't heard of yet? |
I really think that the toplevel package and/or .cargo config should be able to provide any and all flags to rustc I understand the objection when it's being done to a lower package -- it breaks stability -- but as a developer it would be nice to be able to do it at the top level to either get some extra control over the build, or load extra features. Currently we have to do |
Exactly my sentiment. I'm also fine with restricting the extra flags to the top-level package. However, that looks a tad more complex than just adding an |
A somewhat related problem I recently had: If a dependency (such as compiletest.rs) declares Note that my RFC PR would make this a non-problem, but it may still be useful to have a cargo-based workaround in the meantime. |
👍 |
Cargo currently doesn't reexport any unstable functionality of the compiler (as Cargo doesn't have feature staging like Rust does). For this reason I don't think Cargo will support this until it's either stabilized in the compiler or you can pass arbitrary flags down (which you can do with As a result this isn't totally actionable today (until upstream support is stabilized), so I'm going to close this. |
You can't. |
This would essentially just be exposing the functionality of
rustc -Z extra-plugins=...
. The use case I imagine is that programmers can force dependencies to satisfy specific lint requirements (e.g. to outlaw common bad patterns, have stricter requirements aroundunsafe
etc.).See also http://stackoverflow.com/q/30047179/1256624
The text was updated successfully, but these errors were encountered: