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

Edition breakage lint for absolute paths starting with modules #50100

Merged
merged 5 commits into from
Apr 25, 2018

Conversation

Manishearth
Copy link
Member

@Manishearth Manishearth commented Apr 20, 2018

We plan to enable extern_absolute_paths in the 2018 edition. To allow for that, folks must transition their paths in a previous edition to the new one. This makes paths which import module contents via use module:: or ::module:: obsolete, and we must edition-lint these.

https://internals.rust-lang.org/t/the-great-module-adventure-continues/6678/205?u=manishearth is the current plan for paths.

r? @nikomatsakis

Fixes #48722

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@pietroalbini pietroalbini added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 20, 2018
@@ -254,6 +254,13 @@ declare_lint! {
"suggest using `dyn Trait` for trait objects"
}

declare_lint! {
pub FULLY_QUALIFIED_PATH_WITH_MODULE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Fully qualified" is <Type as Trait>::AssocItem, ::a::b::c is "absolute", that's why the feature is called extern_absolute_paths.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Manishearth Manishearth force-pushed the edition-path-lint branch 3 times, most recently from f222c66 to 02ffcea Compare April 20, 2018 21:20
@Manishearth Manishearth changed the title [WIP] Edition breakage lint for fully qualified paths starting with modules [WIP] Edition breakage lint for absolute paths starting with modules Apr 20, 2018
@Manishearth Manishearth force-pushed the edition-path-lint branch 4 times, most recently from 27dea94 to f6884e6 Compare April 20, 2018 23:49
@Manishearth Manishearth changed the title [WIP] Edition breakage lint for absolute paths starting with modules Edition breakage lint for absolute paths starting with modules Apr 20, 2018
@Manishearth
Copy link
Member Author

Added test. Ready for review.

I also discovered that crate:: doesn't work for inline paths, you have to use ::crate::. This is a bug.

@TimNN
Copy link
Contributor

TimNN commented Apr 24, 2018

Ping from triage @nikomatsakis ! This PR needs your review.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 24, 2018

📌 Commit 2a5ce10 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2018
@bors
Copy link
Contributor

bors commented Apr 25, 2018

⌛ Testing commit 2a5ce10 with merge 923031274149b1f0c10f00ce19e60903ac8c8079...

@bors
Copy link
Contributor

bors commented Apr 25, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 25, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:01:31]  Downloading time v0.1.39
[00:01:31] error: unable to get packages from source
[00:01:31] 
[00:01:31] Caused by:
[00:01:31]   failed to get 200 response from `https://crates.io/api/v1/crates/time/0.1.39/download`, got 404
[00:01:31] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:31] Build completed unsuccessfully in 0:00:44
[00:01:31] make: *** [prepare] Error 1
[00:01:31] Makefile:81: recipe for target 'prepare' failed
[00:01:32]  Downloading cmake v0.1.30
[00:01:32] warning: spurious network error (2 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/cmake/0.1.30/download`, got 500
[00:01:32] warning: spurious network error (1 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/cmake/0.1.30/download`, got 500
[00:01:32] error: unable to get packages from source
[00:01:32] error: unable to get packages from source
[00:01:32] 
[00:01:32] Caused by:
[00:01:32]   failed to get 200 response from `https://crates.io/api/v1/crates/cmake/0.1.30/download`, got 500
[00:01:32] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:32] Build completed unsuccessfully in 0:00:00
[00:01:32] Makefile:81: recipe for target 'prepare' failed
[00:01:32] make: *** [prepare] Error 1
[00:01:32]  Downloading time v0.1.39
[00:01:32] error: unable to get packages from source
[00:01:32] 
[00:01:32] Caused by:
[00:01:32] Caused by:
[00:01:32]   failed to get 200 response from `https://crates.io/api/v1/crates/time/0.1.39/download`, got 404
[00:01:32] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:32] Build completed unsuccessfully in 0:00:00
[00:01:32] make: *** [prepare] Error 1
[00:01:32] Makefile:81: recipe for target 'prepare' failed
[00:01:33]  Downloading toml v0.4.6
[00:01:33] error: unable to get packages from source
[00:01:33] 
[00:01:33] Caused by:
[00:01:33] Caused by:
[00:01:33]   failed to get 200 response from `https://crates.io/api/v1/crates/toml/0.4.6/download`, got 404
[00:01:33] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:33] Build completed unsuccessfully in 0:00:00
[00:01:33] Makefile:81: recipe for target 'prepare' failed
[00:01:33] make: *** [prepare] Error 1
[00:01:33]  Downloading cmake v0.1.30
[00:01:34] warning: spurious network error (2 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/cmake/0.1.30/download`, got 500
[00:01:34] warning: spurious network error (1 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/cmake/0.1.30/download`, got 500
[00:01:34] error: unable to get packages from source
[00:01:34] error: unable to get packages from source
[00:01:34] 
[00:01:34] Caused by:
[00:01:34]   failed to get 200 response from `https://crates.io/api/v1/crates/cmake/0.1.30/download`, got 500
[00:01:34] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:34] Build completed unsuccessfully in 0:00:00
[00:01:34] Makefile:81: recipe for target 'prepare' failed
[00:01:34] make: *** [prepare] Error 1
[00:01:34] The command has failed after 5 attempts.

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:0ef11de2
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@nagbot-rs
Copy link

nagbot-rs commented Apr 25, 2018 via email

@bors
Copy link
Contributor

bors commented Apr 25, 2018

@nagbot-rs: 🔑 Insufficient privileges: not in try users

@aturon
Copy link
Member

aturon commented Apr 25, 2018

@bors: retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2018
@aturon
Copy link
Member

aturon commented Apr 25, 2018

@bors: p=1

trying to land edition-related changes

@bors
Copy link
Contributor

bors commented Apr 25, 2018

⌛ Testing commit 2a5ce10 with merge 432fe0c...

bors added a commit that referenced this pull request Apr 25, 2018
Edition breakage lint for absolute paths starting with modules

We plan to enable `extern_absolute_paths` in the 2018 edition. To allow for that, folks must transition their paths in a previous edition to the new one. This makes paths which import module contents via `use module::` or `::module::` obsolete, and we must edition-lint these.

https://internals.rust-lang.org/t/the-great-module-adventure-continues/6678/205?u=manishearth is the current plan for paths.

r? @nikomatsakis

Fixes #48722
@bors
Copy link
Contributor

bors commented Apr 25, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 432fe0c to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants