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

overhaul intra-doc-link ambiguity warning #58824

Merged
merged 3 commits into from
Mar 18, 2019

Conversation

euclio
Copy link
Contributor

@euclio euclio commented Feb 28, 2019

Fixes #52784.

  • Makes the warning part of the intra_doc_link_resolution_failure
    lint.
  • Tightens the span to just the ambiguous link.
  • Reports ambiguities across all three namespaces.
  • Uses structured suggestions for disambiguation.
  • Adds a test for the warnings.

r? @QuietMisdreavus

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

The job mingw-check 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:02e239a8:start=1551393402098862844,finish=1551393403024057781,duration=925194937
$ 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
Setting environment variables from .travis.yml
$ export IMAGE=mingw-check
---
$ pip install --user awscli; export PATH=$PATH:$HOME/.local/bin:$HOME/Library/Python/2.7/bin/
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
Collecting awscli
  Downloading https://files.pythonhosted.org/packages/aa/ea/cb62728e9b38f9d8c620d60815f8dd54ca015f6b9af8f5a3d03d9b2e3c64/awscli-1.16.115-py2.py3-none-any.whl (1.4MB)
    1% |▌                               | 20kB 2.2MB/s eta 0:00:01
    2% |▊                               | 30kB 3.2MB/s eta 0:00:01
    2% |█                               | 40kB 2.1MB/s eta 0:00:01
    3% |█▏                              | 51kB 2.6MB/s eta 0:00:01
---
    99% |████████████████████████████████| 542kB 90.1MB/s eta 0:00:01
    100% |████████████████████████████████| 552kB 27.2MB/s 
Requirement already satisfied: PyYAML<=3.13,>=3.10 in /usr/lib/python2.7/dist-packages (from awscli) (3.11)
Collecting botocore==1.12.105 (from awscli)
  Downloading https://files.pythonhosted.org/packages/cf/ce/acc9013dee20fc94c9b9ae121f5b7b342a206f0d577be1e5c6129811194a/botocore-1.12.105-py2.py3-none-any.whl (5.3MB)
    0% |▏                               | 20kB 29.9MB/s eta 0:00:01
    0% |▏                               | 30kB 36.0MB/s eta 0:00:01
    0% |▎                               | 40kB 41.5MB/s eta 0:00:01
    0% |▎                               | 51kB 45.7MB/s eta 0:00:01
---
[00:06:51]    --> src/librustdoc/passes/collect_intra_doc_links.rs:563:21
[00:06:51]     |
[00:06:51] 561 |                     Def::Method(..) | Def::Fn(..) => {
[00:06:51]     |                                                      - close delimiter possibly meant for this
[00:06:51] 562 |                         ("add parentheses", format!("{}()", path_str)
[00:06:51]     |                         - un-closed delimiter
[00:06:51]     |                     ^ incorrect close delimiter
[00:06:51] 
[00:06:55] error: aborting due to previous error
[00:06:55] 
---
travis_time:end:01170a56:start=1551393830096704322,finish=1551393830101886727,duration=5182405
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:332b24d7
$ 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:15227283
travis_time:start:15227283
$ 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:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:09d8a1e0
$ dmesg | grep -i kill

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)

@euclio euclio changed the title overhaul intra-doc-link ambiguity warning [WIP] overhaul intra-doc-link ambiguity warning Mar 6, 2019
@bors
Copy link
Contributor

bors commented Mar 8, 2019

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

@petrochenkov petrochenkov 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 Mar 8, 2019
@euclio euclio changed the title [WIP] overhaul intra-doc-link ambiguity warning overhaul intra-doc-link ambiguity warning Mar 9, 2019
@euclio
Copy link
Contributor Author

euclio commented Mar 10, 2019

@petrochenkov Comments addressed, ready for another review.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 10, 2019

📌 Commit 4ac4a966defb942e0792b1704c86ca82fd8bc2e7 has been approved by petrochenkov

@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 Mar 10, 2019
@bors
Copy link
Contributor

bors commented Mar 10, 2019

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

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 10, 2019
@euclio
Copy link
Contributor Author

euclio commented Mar 10, 2019

@petrochenkov Rebased.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 10, 2019

📌 Commit 3bb2275 has been approved by petrochenkov

@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 Mar 10, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Mar 14, 2019
…ochenkov

overhaul intra-doc-link ambiguity warning

Fixes rust-lang#52784.

- Makes the warning part of the `intra_doc_link_resolution_failure`
lint.
- Tightens the span to just the ambiguous link.
- Reports ambiguities across all three namespaces.
- Uses structured suggestions for disambiguation.
- Adds a test for the warnings.

r? @QuietMisdreavus
@Mark-Simulacrum
Copy link
Member

This PR (likely in combination with some other PR) failed on CI in the rollup (#59183). Not de-approving because which PR caused the failure I'm not sure.

@euclio
Copy link
Contributor Author

euclio commented Mar 14, 2019

Looks like #59044 broke this. I can rebase later today.

- Makes the warning part of the `intra_doc_link_resolution_failure`
lint.
- Tightens the span to just the ambiguous link.
- Reports ambiguities across all three namespaces.
- Uses structured suggestions for disambiguation.
- Adds a test for the warnings.
@euclio
Copy link
Contributor Author

euclio commented Mar 16, 2019

Rebased, not sure if this needs to be reapproved.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 16, 2019

📌 Commit 7c66ae2 has been approved by petrochenkov

@petrochenkov
Copy link
Contributor

@euclio
r+ approves a specific commit, so a re-approval is needed when new commits added, or the old ones are changed (e.g. during rebase).

@bors
Copy link
Contributor

bors commented Mar 18, 2019

⌛ Testing commit 7c66ae2 with merge 03dafa7...

bors added a commit that referenced this pull request Mar 18, 2019
overhaul intra-doc-link ambiguity warning

Fixes #52784.

- Makes the warning part of the `intra_doc_link_resolution_failure`
lint.
- Tightens the span to just the ambiguous link.
- Reports ambiguities across all three namespaces.
- Uses structured suggestions for disambiguation.
- Adds a test for the warnings.

r? @QuietMisdreavus
@bors
Copy link
Contributor

bors commented Mar 18, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: petrochenkov
Pushing 03dafa7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 18, 2019
@bors bors merged commit 7c66ae2 into rust-lang:master Mar 18, 2019
@euclio euclio deleted the intra-link-ambiguity branch March 18, 2019 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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