Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow loading plugins into dependencies #1579
Comments
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
Cargo is currently very specifically avoiding all |
This comment has been minimized.
This comment has been minimized.
|
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? |
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
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. |
ticki
referenced this issue
Aug 14, 2015
Closed
Let user specify used compiler plugins in Cargo.toml #1905
This comment has been minimized.
This comment has been minimized.
ticki
commented
Aug 14, 2015
|
|
This comment has been minimized.
This comment has been minimized.
|
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. |
alexcrichton
closed this
Aug 14, 2015
This comment has been minimized.
This comment has been minimized.
|
You can't. |
huonw commentedMay 5, 2015
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 aroundunsafeetc.).See also http://stackoverflow.com/q/30047179/1256624