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

Centralize panic macro documentation #61511

Open
wants to merge 2 commits into
base: master
from

Conversation

@czipperz
Copy link
Contributor

commented Jun 4, 2019

Closes #61327

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 4, 2019

r? @kennytm

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 4, 2019

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:006e0f20:start=1559626098691822325,finish=1559626099515009203,duration=823186878
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:04:53]    Compiling autocfg v0.1.4
[00:04:54] error: couldn't read src/libcore/panic.md: No such file or directory (os error 2)
[00:04:54]  --> src/libcore/macros/mod.rs:1:17
[00:04:54]   |
[00:04:54] 1 | #[doc(include = "panic.md")]
[00:04:54]   |                 ^^^^^^^^^^ couldn't read file
[00:04:54]   |
[00:04:54]   = help: external doc paths are relative to the crate root
[00:04:54]    Compiling build_helper v0.1.0 (/checkout/src/build_helper)
[00:04:55]    Compiling unwind v0.0.0 (/checkout/src/libunwind)
[00:04:56]    Compiling backtrace v0.3.25
[00:05:00]    Compiling compiler_builtins v0.1.15
---
travis_time:end:048e1bc6:start=1559626421812777979,finish=1559626421817262760,duration=4484781
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0c76e4c5
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0f1ca043
travis_time:start:0f1ca043
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:en

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)

@czipperz

This comment has been minimized.

Copy link
Contributor Author

commented Jun 4, 2019

Haha I misread the docs for how the macro works. It's from crate root rather than file relative.

@czipperz

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2019

I'm not sure that making a macros directory is the right approach here. Should we have a shared documentation folder?

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2019

☔️ The latest upstream changes (presumably #61789) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

ping from triage
r? @steveklabnik
can you review this?

@rust-highfive rust-highfive assigned steveklabnik and unassigned kennytm Jul 1, 2019

@czipperz

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2019

Before I rebase this, I would like to come to a definitive conclusion on my previous concern

@edmilsonefs

This comment has been minimized.

Copy link

commented Jul 22, 2019

Hey! This is a ping from triage, we would like to know if there is someone from @rust-lang/docs which can help here.

Your effort will be very appreciated!

@Dylan-DPC

This comment has been minimized.

Copy link
Member

commented Jul 22, 2019

@edmilsonefs

This comment has been minimized.

Copy link

commented Jul 22, 2019

Note: I just got a feedback from @steveklabnik on Discord and he told me he will check it in a few hours.

@steveklabnik

This comment has been minimized.

Copy link
Member

commented Jul 22, 2019

I am not sure what the answer is:

I'm not sure that making a macros directory is the right approach here. Should we have a shared documentation folder?

@rust-lang/rustdoc is better equipped to give advice than I am.

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

Looks good to me! r=me once conflicts fixed.

@czipperz

This comment has been minimized.

Copy link
Contributor Author

commented Jul 25, 2019

Rebased

@czipperz czipperz force-pushed the czipperz:centralize-panic-macro-documentation branch from 245b915 to 4687c64 Jul 25, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 25, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (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.
2019-07-25T03:57:51.6755665Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-25T03:57:51.6990806Z ##[command]git config gc.auto 0
2019-07-25T03:57:51.7072070Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-25T03:57:51.7139106Z ##[command]git config --get-all http.proxy
2019-07-25T03:57:51.7281746Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/61511/merge:refs/remotes/pull/61511/merge
---
2019-07-25T03:58:27.1725100Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-25T03:58:27.1725144Z 
2019-07-25T03:58:27.1725369Z   git checkout -b <new-branch-name>
2019-07-25T03:58:27.1725402Z 
2019-07-25T03:58:27.1725875Z HEAD is now at e3e270d95 Merge 4687c64f1e65f7561ab2658d9b42a2658967c8f7 into 03f19f7ff128a3b01eeab3f87f04cce22883f006
2019-07-25T03:58:27.1861661Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-25T03:58:27.1864821Z ==============================================================================
2019-07-25T03:58:27.1864908Z Task         : Bash
2019-07-25T03:58:27.1864958Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-25T04:04:57.0978163Z tidy check
2019-07-25T04:04:58.0058835Z * 577 error codes
2019-07-25T04:04:58.0059008Z * highest error code: E0732
2019-07-25T04:04:58.2982373Z * 267 features
2019-07-25T04:04:58.5476035Z tidy error: `/checkout/src/libcore/macros/mod.rs` contains `#[test]`; libcore tests must be placed inside `src/libcore/tests/`
2019-07-25T04:04:58.8562118Z some tidy checks failed
2019-07-25T04:04:58.8562250Z 
2019-07-25T04:04:58.8562250Z 
2019-07-25T04:04:58.8563495Z 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"
2019-07-25T04:04:58.8563621Z 
2019-07-25T04:04:58.8563651Z 
2019-07-25T04:04:58.8572714Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-07-25T04:04:58.8572805Z Build completed unsuccessfully in 0:01:32
2019-07-25T04:04:58.8572805Z Build completed unsuccessfully in 0:01:32
2019-07-25T04:05:00.1769564Z ##[error]Bash exited with code '1'.
2019-07-25T04:05:00.1801055Z ##[section]Starting: Checkout
2019-07-25T04:05:00.1802772Z ==============================================================================
2019-07-25T04:05:00.1802828Z Task         : Get sources
2019-07-25T04:05:00.1803027Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2019

☔️ The latest upstream changes (presumably #62990) made this pull request unmergeable. Please resolve the merge conflicts.

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

commented Jul 26, 2019

Arf sorry, didn't see your message... Please rebase once more and ping me.

@czipperz czipperz force-pushed the czipperz:centralize-panic-macro-documentation branch from 4687c64 to 421d9ea Jul 27, 2019

@czipperz

This comment has been minimized.

Copy link
Contributor Author

commented Jul 27, 2019

@GuillaumeGomez rebased

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 27, 2019

Your PR failed (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.
2019-07-27T15:51:20.2984022Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-27T15:51:20.3206259Z ##[command]git config gc.auto 0
2019-07-27T15:51:20.3262550Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-27T15:51:20.3322567Z ##[command]git config --get-all http.proxy
2019-07-27T15:51:20.3456124Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/61511/merge:refs/remotes/pull/61511/merge
---
2019-07-27T15:51:54.0671496Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-27T15:51:54.0671708Z 
2019-07-27T15:51:54.0672114Z   git checkout -b <new-branch-name>
2019-07-27T15:51:54.0681900Z 
2019-07-27T15:51:54.0682383Z HEAD is now at 486a93803 Merge 421d9ea1bd462133341e0b906d60cd0fea82d3f3 into 0e9b465d729d07101b29b4d096d83edf9be82df0
2019-07-27T15:51:54.0824468Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-27T15:51:54.0827591Z ==============================================================================
2019-07-27T15:51:54.0827672Z Task         : Bash
2019-07-27T15:51:54.0827719Z Description  : Run a Bash script on macOS, Linux, or Windows

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

This comment has been minimized.

Copy link
Member

commented Jul 27, 2019

Tests failed.

@czipperz

This comment has been minimized.

Copy link
Contributor Author

commented Jul 27, 2019

mingw seems to be spuriously failing? linux x86_64 is erroring with:

tidy check
* 577 error codes
* highest error code: E0732
* 267 features
tidy error: `/checkout/src/libcore/macros/mod.rs` contains `#[test]`; libcore tests must be placed inside `src/libcore/tests/`
some tidy checks failed

I don't get why master is green if this is the case because I haven't edited the macros.rs file but rather just moved it to mod.rs. I can pull out the tests I guess

@czipperz

This comment has been minimized.

Copy link
Contributor Author

commented Jul 28, 2019

I'm trying to build locally and am getting a lot of weird build breakages.

@czipperz

This comment has been minimized.

Copy link
Contributor Author

commented Jul 28, 2019

Specifically when src/libcore/macros/mod.rs includes macros/panic.md it fails saying it can't find src/libcore/macros/macros/panic.md. Then when I change it to include panic.md it fails saying it can't find src/libcore/panic.md. Then I change it back to macros/panic.md and it starts working again. Very strange. Doing ./x.py build -i --stage 1 src/libstd fyi.

@czipperz

This comment has been minimized.

Copy link
Contributor Author

commented Jul 28, 2019

error: couldn't read src/libcore/macros/macros/panic.md: No such file or directory (os error 2)
 --> src/libcore/macros/mod.rs:1:17
  |
1 | #[doc(include = "macros/panic.md")]
  |                 ^^^^^^^^^^^^^^^^^ couldn't read file
@jplatte

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

A related PR was merged 5 days ago: #60938

That might be the cause of the CI issues. This PR might also now have to wait for the release of Rust 1.37 due to bootstrapping concerns (I'm not an expert on this though).

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

Let's wait for the new release then. Extra safety doesn't hurt.

@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 1, 2019

☔️ The latest upstream changes (presumably #62507) made this pull request unmergeable. Please resolve the merge conflicts.

@hdhoang

This comment has been minimized.

Copy link
Contributor

commented Aug 9, 2019

from triage: I have changed this PR to S-blocked, waiting for rust 1.37 release. The author will resolve conflict afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.