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 upRust 1.19 regression, 0.1.8, variant is private and cannot be reexported in pub glob #42460
Comments
brson
added
the
regression-from-stable-to-nightly
label
Jun 6, 2017
This comment has been minimized.
This comment has been minimized.
|
Probably from #42136 What exactly is going on here that is broken? It looks like they might be reexporting private variants, but I don't see a lint in the linked PR that looks exactly like that. |
This comment has been minimized.
This comment has been minimized.
|
cargobomb sees this in 5-6 crates revisions, some in wide use like mustache and nickel. |
This comment has been minimized.
This comment has been minimized.
|
nickel inherits the breakage from mustache. |
This comment has been minimized.
This comment has been minimized.
|
Quite a few crates infected by mustache here. |
This comment has been minimized.
This comment has been minimized.
|
@brson |
brson
added
P-high
T-compiler
I-needs-decision
labels
Jun 15, 2017
This comment has been minimized.
This comment has been minimized.
|
@petrochenkov did we consider exempting the private variants from the |
brson
assigned
petrochenkov
Jun 15, 2017
This comment has been minimized.
This comment has been minimized.
|
@petrochenkov I've assigned you. |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis enum E {
V,
U,
}
pub use E::*; // OK, but exports nothing, should be reported as unused importwhich is quite reasonable and consistent with module behavior mod m {
struct A;
struct B;
}
pub use m::*; // OK, but exports nothing, should be reported as unused import but doesn't currentlyThere are two issues with this
As a result, I'm mildly in favor of turning this error into "unused import" warning, but I't won't help with |
This comment has been minimized.
This comment has been minimized.
|
Yes, I think you understood me.
In other words, it really wants the enum to be public, but it's not?
This was the precedent I was thinking of, yeah. It's sort of "as if" the enum were a mini-module -- but the analogy doesn't quite work, since if the items were truly acting like private members, then |
This comment has been minimized.
This comment has been minimized.
Yes. |
This comment has been minimized.
This comment has been minimized.
|
@brson unfortunately I don't have commit access to the current mustache repository. I've asked for access in nickel-org/rust-mustache#47. |
This comment has been minimized.
This comment has been minimized.
|
What is the current status here? I'm having second thoughts about accepting this code, given that the analogy to a module doesn't really hold up -- can we patch up the crates in question? |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis |
This comment has been minimized.
This comment has been minimized.
|
@petrochenkov ok -- so -- is any further action needed here then? I guess we just want to see whether older versions of mustache and nickel need some sort of update? |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis
Most of mustache versions are not tagged, there are also no version branches to send PRs to, and @erickt , who has publishing rights, is silent. What can we do? Wash our hands, I guess. |
nikomatsakis
added
relnotes
and removed
I-needs-decision
labels
Jul 6, 2017
This comment has been minimized.
This comment has been minimized.
|
OK, I am going to close as "changed due to bug fix" then. I added the relnotes tag, because this change potentially affects end users. Specifically, code like this used to compile, even though it is re-exporting private variants (Bar, Baz) as public:
We now correctly report a compilation error. |
nikomatsakis
closed this
Jul 6, 2017
This comment has been minimized.
This comment has been minimized.
|
@petrochenkov it is an older mustache but one that is a dependency of many crates. |
brson commentedJun 6, 2017
https://github.com/rust-locale/rust-locale