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

Fix HashMap visualizers in Visual Studio (Code) #76389

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

MaulingMonkey
Copy link
Contributor

CDB (as used in unit tests) doesn't care that we're using static_cast between unrelated types (u8* to tuple<$T1, $T2>*).
Visual Studio & Visual Studio Code care. These should've been reinterpret_cast or C casts.

Credit to @petrochenkov per #76352 for helping catch this.

Testing

x.py test --stage 1 src/tools/tidy
x.py test --stage 1 --build x86_64-pc-windows-msvc src\test\debuginfo

CDB doesn't care that you're using static_cast between unrelated types.
VS(C) does.  These should've been reinterpret_cast or C casts.
Cast is from e.g. `u8*` to `tuple<$T1, $T2>*`
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(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 Sep 5, 2020
@petrochenkov
Copy link
Contributor

r? @petrochenkov @bors r+ rollup

This fixes an issue introduced in #70052, so it needs a beta backport, if I'm counting correctly.

@bors
Copy link
Contributor

bors commented Sep 6, 2020

📌 Commit 5acd272 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 6, 2020
@petrochenkov petrochenkov added beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 6, 2020
@bors
Copy link
Contributor

bors commented Sep 7, 2020

⌛ Testing commit 5acd272 with merge a44b3feeb49707093c85f9a85dea92b5dbcdc130...

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, 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.
Build completed successfully in 0:01:55
+ /scripts/validate-toolstate.sh
Cloning into 'rust-toolstate'...
<Nothing changed>
HTTPError: HTTP Error 403: Forbidden
b'{"message":"API rate limit exceeded for user ID 7378925.","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}'
Traceback (most recent call last):
  File "../../src/tools/publish_toolstate.py", line 288, in <module>
    validate_maintainers(repo, github_token)
  File "../../src/tools/publish_toolstate.py", line 84, in validate_maintainers
    'Accept': 'application/vnd.github.hellcat-preview+json',
  File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
  local time: Mon Sep  7 09:15:11 UTC 2020
  network time: Mon, 07 Sep 2020 09:15:11 GMT
== end clock drift check ==
== end clock drift check ==
##[error]Process completed with exit code 1.
Terminate orphan process: pid (5770) (node)
Terminate orphan process: pid (5779) (python)

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 @rust-lang/infra. (Feature Requests)

@bors
Copy link
Contributor

bors commented Sep 7, 2020

💔 Test failed - checks-actions

@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 Sep 7, 2020
@petrochenkov
Copy link
Contributor

2020-09-07T09:15:11.6377660Z HTTPError: HTTP Error 403: Forbidden
2020-09-07T09:15:11.6379339Z b'{"message":"API rate limit exceeded for user ID 7378925.","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}'

@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 Sep 7, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 7, 2020
…, r=petrochenkov

Fix HashMap visualizers in Visual Studio (Code)

CDB (as used in unit tests) doesn't care that we're using static_cast between unrelated types (`u8*` to `tuple<$T1, $T2>*`).
Visual Studio & Visual Studio Code care.  These should've been reinterpret_cast or C casts.

Credit to @petrochenkov per rust-lang#76352 for helping catch this.

### Testing

```cmd
x.py test --stage 1 src/tools/tidy
x.py test --stage 1 --build x86_64-pc-windows-msvc src\test\debuginfo
```
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 9, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#76162 (Make duration_since documentation more clear)
 - rust-lang#76355 (remove public visibility previously needed for rustfmt)
 - rust-lang#76374 (Improve ayu doc source line number contrast)
 - rust-lang#76379 (rustbuild: Remove `Mode::Codegen`)
 - rust-lang#76389 (Fix HashMap visualizers in Visual Studio (Code))
 - rust-lang#76396 (Fix typo in tracking issue template)
 - rust-lang#76401 (Add help note to unconstrained const parameter)
 - rust-lang#76402 (Update linker-plugin-lto.md to contain up to rust 1.46)
 - rust-lang#76403 (Fix documentation for TyCtxt::all_impls)
 - rust-lang#76498 (Update cargo)

Failed merges:

 - rust-lang#76458 (Add drain_filter method to HashMap and HashSet)

r? `@ghost`
@bors bors merged commit 222b885 into rust-lang:master Sep 9, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 9, 2020
@spastorino
Copy link
Member

discussed in T-compiler meeting.

@rustbot modify labels: beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 10, 2020
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 17, 2020
@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.48.0, 1.47.0 Sep 17, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 17, 2020
…ulacrum

[beta] backports

* Ignore rustc_private items from std docs rust-lang#76571
* Fix HashMap visualizers in Visual Studio (Code) rust-lang#76389
* Account for version number in NtIdent hack rust-lang#76331
* Account for async functions when suggesting new named lifetime rust-lang#75867
* Fix loading pretty-printers in rust-lldb script rust-lang#76015

This also bumps to the released stable compiler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants