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

[1.38] Regression: failed to resolve: could not find rustc_serialize in {{root}} #63885

Closed
petrochenkov opened this issue Aug 25, 2019 · 2 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@petrochenkov
Copy link
Contributor

#63628 (comment)

Caused by #63449.
Tests in rustc-serialize and its fork rustc-serialize2 are broken, no other crates are affected.
(Can be fixed with extern crate self as rustc_serivalize;.)
Probably no action required.

@petrochenkov petrochenkov added regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 25, 2019
@Mark-Simulacrum Mark-Simulacrum added this to the 1.38 milestone Aug 30, 2019
@nikomatsakis
Copy link
Contributor

Check-in from compiler team:

This is some sort of issue triggered by upgrading RustcSerialize to Rust 2018. It is specific to the rustc-serialize crate itself, as partially caused by having derive(RustcSerialize) in a "semi-blessed" state, i.e., built-in to compiler but also in a crate. Not a general purpose problem. Closing as "no action required".

@petrochenkov
Copy link
Contributor Author

petrochenkov commented Sep 5, 2019

The reason of breakage is that #63449 migrated derive(RustcEncodable, RustcDecodable) to 2018 edition as a part of compiler simplification (these macros now take their edition from libcore in which they are defined).

As a result, code like this was broken:

extern crate serialize;
use serialize as rustc_serialize;

// uses `::rustc_serialize` internally,
// on 2018 edition it means *crate* rustc_serialize,
// not a name in root module.
#[derive(RustcEncodable)]
struct S;

Code like this appears either in code using unstable crate serialize from sysroot, or inside rustc-serialize itself in testing mode, which uses a similar construction:

mod rustc_serialize {
    pub use serialize::*;
}

// `::rustc_serialize` no longer resolves to the module in the root on 2018 edition
#[derive(RustcEncodable)]
struct S;

@Centril Centril removed this from the 1.38 milestone Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants