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

Closed

Conversation

czipperz
Copy link
Contributor

@czipperz czipperz commented Jun 4, 2019

Closes #61327

@rust-highfive
Copy link
Collaborator

r? @kennytm

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 4, 2019
@rust-highfive
Copy link
Collaborator

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
Copy link
Contributor Author

czipperz commented Jun 4, 2019

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

@czipperz
Copy link
Contributor Author

czipperz 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
Copy link
Contributor

bors commented Jun 13, 2019

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

@Dylan-DPC-zz
Copy link

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

@rust-highfive rust-highfive assigned steveklabnik and unassigned kennytm Jul 1, 2019
@czipperz
Copy link
Contributor Author

czipperz commented Jul 2, 2019

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

@edmilsonefs
Copy link

edmilsonefs 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-zz
Copy link

@rust-lang/docs

@edmilsonefs
Copy link

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

@steveklabnik
Copy link
Member

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
Copy link
Member

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

@czipperz
Copy link
Contributor Author

Rebased

@czipperz czipperz force-pushed the centralize-panic-macro-documentation branch from 245b915 to 4687c64 Compare July 25, 2019 03:56
@rust-highfive
Copy link
Collaborator

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)

@kennytm kennytm 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 Jul 25, 2019
@bors
Copy link
Contributor

bors commented Jul 26, 2019

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

@GuillaumeGomez
Copy link
Member

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

@czipperz czipperz force-pushed the centralize-panic-macro-documentation branch from 4687c64 to 421d9ea Compare July 27, 2019 15:50
@czipperz
Copy link
Contributor Author

@GuillaumeGomez rebased

@rust-highfive
Copy link
Collaborator

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
Copy link
Member

Tests failed.

@czipperz
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@czipperz
Copy link
Contributor Author

czipperz 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
Copy link
Contributor Author

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
Copy link
Contributor

jplatte 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
Copy link
Member

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

@bors
Copy link
Contributor

bors commented Aug 1, 2019

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

@hdhoang hdhoang added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 9, 2019
@hdhoang
Copy link
Contributor

hdhoang 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.

@Mark-Simulacrum
Copy link
Member

Moving back to waiting-on-author. This should be no longer blocked on release process (we're in 1.40 cycle now).

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Oct 24, 2019
@joelpalmer
Copy link

Ping from Triage: @czipperz Any updates?

@czipperz
Copy link
Contributor Author

Ping me again next week and I'll rebase it

@Alexendoo
Copy link
Member

Ping from triage: @czipperz Next week is upon us

@joelpalmer
Copy link

Ping from triage: @czipperz any updates?

@Dylan-DPC-zz
Copy link

Closing this due to inactivity. @czipperz thanks for contributing :)

@Dylan-DPC-zz Dylan-DPC-zz added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 12, 2019
Centril added a commit to Centril/rust that referenced this pull request Nov 17, 2019
…lan-DPC

Centralize panic macro documentation

This is just the main commit from rust-lang#61511 (which got closed because the author didn't reply) cherry-picked on the current master. Building `core` and `std` on this branch in stage 1 succeeded, which I thinks means the issues from the previous PR should be gone (but let's see what CI says).
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 17, 2019
…lan-DPC

Centralize panic macro documentation

This is just the main commit from rust-lang#61511 (which got closed because the author didn't reply) cherry-picked on the current master. Building `core` and `std` on this branch in stage 1 succeeded, which I thinks means the issues from the previous PR should be gone (but let's see what CI says).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core::panic documentation is useless