Skip to content

Prevent infinite recursion of modules #50305

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

Merged
merged 1 commit into from
May 8, 2018

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive
Copy link
Contributor

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:04:31] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:31] tidy error: /checkout/src/test/rustdoc/mod-stackoverflow.rs: missing trailing newline
[00:04:32] some tidy checks failed
[00:04:32] 
[00:04:32] 
[00:04:32] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:32] 
[00:04:32] 
[00:04:32] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:32] Build completed unsuccessfully in 0:01:53
[00:04:32] Build completed unsuccessfully in 0:01:53
[00:04:32] make: *** [tidy] Error 1
[00:04:32] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:2e1b706e
$ 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)

@GuillaumeGomez GuillaumeGomez force-pushed the fix-mod-stackoverflow branch from b7c2028 to fe2a570 Compare April 29, 2018 18:28
@@ -401,7 +401,7 @@ fn build_module(cx: &DocContext, did: DefId) -> clean::Module {
for &item in cx.tcx.item_children(did).iter() {
let def_id = item.def.def_id();
if item.vis == ty::Visibility::Public {
if !visited.insert(def_id) { continue }
if did == def_id || !visited.insert(def_id) { continue }
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't fix the original issue from #50196 which looks like:

pub mod tree {
    pub mod prelude {
        pub use tree;
    }
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. I'll store every def id instead to be sure the item isn't one of its parents.

@shepmaster shepmaster added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 30, 2018
@GuillaumeGomez GuillaumeGomez force-pushed the fix-mod-stackoverflow branch from fe2a570 to b2b7510 Compare May 1, 2018 11:29
@GuillaumeGomez
Copy link
Member Author

Updated.

@QuietMisdreavus
Copy link
Member

Can you change your test (or add a new one) to use the sample @ollie27 provided?

@shepmaster shepmaster added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 6, 2018
@shepmaster
Copy link
Member

Ping from triage, @GuillaumeGomez ! You have some feedback to address!

@GuillaumeGomez
Copy link
Member Author

Indeed, will update soon. :)

@GuillaumeGomez GuillaumeGomez force-pushed the fix-mod-stackoverflow branch from b2b7510 to 3ba7c00 Compare May 7, 2018 10:44
@GuillaumeGomez
Copy link
Member Author

Updated.

@QuietMisdreavus
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented May 7, 2018

📌 Commit 3ba7c00 has been approved by QuietMisdreavus

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 7, 2018
@bors
Copy link
Collaborator

bors commented May 7, 2018

⌛ Testing commit 3ba7c00 with merge 715d6a9...

bors added a commit that referenced this pull request May 7, 2018
…isdreavus

Prevent infinite recursion of modules

Fixes #50196.

r? @QuietMisdreavus
@bors
Copy link
Collaborator

bors commented May 8, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: QuietMisdreavus
Pushing 715d6a9 to master...

@bors bors merged commit 3ba7c00 into rust-lang:master May 8, 2018
@GuillaumeGomez GuillaumeGomez deleted the fix-mod-stackoverflow branch May 8, 2018 10:32
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.

6 participants