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

incremental: migrate diagnostics #100754

Merged
merged 5 commits into from
Jan 31, 2023
Merged

Conversation

davidtwco
Copy link
Member

@davidtwco davidtwco commented Aug 19, 2022

  • Apply the diagnostic migration lints to more functions on Session, namely: span_warn, span_warn_with_code, warn note_without_error, span_note_without_error, struct_note_without_error.
  • Add impls of IntoDiagnosticArg for std::io::Error, std::path::Path and std::path::PathBuf.
  • Migrate the rustc_incremental crate's diagnostics to translatable diagnostic structs.

r? @compiler-errors
cc #100717

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 19, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2022
@compiler-errors
Copy link
Member

r=me, rebased after that fatal pr lands

@compiler-errors compiler-errors 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 Aug 21, 2022
@bors

This comment was marked as resolved.

@davidtwco davidtwco force-pushed the translation-incremental branch 2 times, most recently from 20c0940 to 3becaaf Compare August 22, 2022 14:55
@davidtwco
Copy link
Member Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Aug 22, 2022

📌 Commit 3becaaf has been approved by compiler-errors

It is now in the queue for this repository.

@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 Aug 22, 2022
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 24, 2022
…s, r=davidtwco

save_analysis: Migrate diagnostic

* Migrate the `rustc_save_analysis` crate's diagnostic to translatable diagnostic structs.

Depends on rust-lang#100694 and rust-lang#100754 for #[fatal(..)] support, then rust-lang@aa68eb4, rust-lang@f5219a3, rust-lang@7da52f6 can be removed. (I copied commits from rust-lang#100754)
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 24, 2022
…s, r=davidtwco

save_analysis: Migrate diagnostic

* Migrate the `rustc_save_analysis` crate's diagnostic to translatable diagnostic structs.

Depends on rust-lang#100694 and rust-lang#100754 for #[fatal(..)] support, then rust-lang@aa68eb4, rust-lang@f5219a3, rust-lang@7da52f6 can be removed. (I copied commits from rust-lang#100754)
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Aug 27, 2022
… r=compiler-errors

incremental: migrate diagnostics

- Apply the diagnostic migration lints to more functions on `Session`, namely: `span_warn`, `span_warn_with_code`, `warn` `note_without_error`, `span_note_without_error`, `struct_note_without_error`.
- Add impls of `IntoDiagnosticArg` for `std::io::Error`, `std::path::Path` and `std::path::PathBuf`.
- Migrate the `rustc_incremental` crate's diagnostics to translatable diagnostic structs.

r? ```@compiler-errors```
cc rust-lang#100717
@compiler-errors
Copy link
Member

@bors r- failed in rollup I think

@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 Aug 27, 2022
@JhonnyBillM

This comment was marked as resolved.

Forward the `Display` implementation for `CrateType` to
`IntoDiagnosticArg` so that it can be used in diagnostic structs.

Signed-off-by: David Wood <david.wood@huawei.com>
Apply the diagnostic migration lint to more functions on `Session`.

Signed-off-by: David Wood <david.wood@huawei.com>
Migrate the `rustc_incremental` crate's diagnostics to translatable
diagnostic structs.

Signed-off-by: David Wood <david.wood@huawei.com>
@davidtwco
Copy link
Member Author

Okay, managed to reproduce this and fix it - diagnostic args weren't being hashed as part of Diagnostic, so we were deduplicating a warning for unsupported crate types, which Cargo parses.

@davidtwco
Copy link
Member Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Jan 31, 2023

📌 Commit 2ff4664 has been approved by compiler-errors

It is now in the queue for this repository.

@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 Jan 31, 2023
@bors
Copy link
Contributor

bors commented Jan 31, 2023

⌛ Testing commit 2ff4664 with merge 79595d1652139e0cdb8fb3ff3ea67f2c9a190a0a...

@bors
Copy link
Contributor

bors commented Jan 31, 2023

💔 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 Jan 31, 2023
@davidtwco
Copy link
Member Author

I think that's spurious - nothing in this PR should cause a failure in building LLVM?

@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 Jan 31, 2023
@bors
Copy link
Contributor

bors commented Jan 31, 2023

⌛ Testing commit 2ff4664 with merge a64ef7d...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-mingw-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2620/3025] Building CXX object tools/dsymutil/CMakeFiles/dsymutil.dir/MachOUtils.cpp.obj
[2621/3025] Building CXX object tools/dsymutil/CMakeFiles/dsymutil.dir/SymbolMap.cpp.obj
[2622/3025] Linking CXX static library lib\libLLVMGlobalISel.a
[2623/3025] Linking CXX static library lib\libLLVMAArch64CodeGen.a
FAILED: lib/libLLVMAArch64CodeGen.a 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E rm -f lib\libLLVMAArch64CodeGen.a && D:\a\rust\rust\mingw64\bin\ar.exe qc lib\libLLVMAArch64CodeGen.a  lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64CallLowering.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64GlobalISelUtils.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64InstructionSelector.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64LegalizerInfo.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64O0PreLegalizerCombiner.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64PreLegalizerCombiner.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64PostLegalizerCombiner.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64PostLegalizerLowering.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64PostSelectOptimize.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/GISel/AArch64RegisterBankInfo.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64A57FPLoadBalancing.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64AdvSIMDScalarPass.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64AsmPrinter.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64BranchTargets.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64CallingConvention.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64CleanupLocalDynamicTLSPass.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64CollectLOH.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64CondBrTuning.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64ConditionalCompares.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64DeadRegisterDefinitionsPass.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64ExpandImm.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64ExpandPseudoInsts.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64FalkorHWPFFix.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64FastISel.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64A53Fix835769.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64FrameLowering.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64CompressJumpTables.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64ConditionOptimizer.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64RedundantCopyElimination.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64ISelDAGToDAG.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64ISelLowering.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64InstrInfo.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64LoadStoreOptimizer.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64LowerHomogeneousPrologEpilog.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64MachineFunctionInfo.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64MachineScheduler.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64MacroFusion.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64MIPeepholeOpt.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64MCInstLower.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64PromoteConstant.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64PBQPRegAlloc.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64RegisterInfo.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64SLSHardening.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64SelectionDAGInfo.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64SpeculationHardening.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64StackTagging.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64StackTaggingPreRA.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64StorePairSuppress.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64Subtarget.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetMachine.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetObjectFile.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/SVEIntrinsicOpts.cpp.obj lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64SIMDInstrOpt.cpp.obj && D:\a\rust\rust\mingw64\bin\ranlib.exe lib\libLLVMAArch64CodeGen.a && cd ."
D:\a\rust\rust\mingw64\bin\ar.exe: could not create temporary file whilst writing archive: no more archived files
[2624/3025] Linking CXX static library lib\libLLVMBPFCodeGen.a
[2625/3025] Linking CXX static library lib\libLLVMMSP430CodeGen.a
[2626/3025] Building CXX object tools/lli/CMakeFiles/lli.dir/ExecutionUtils.cpp.obj
[2627/3025] Linking CXX static library lib\libLLVMHexagonCodeGen.a
[2627/3025] Linking CXX static library lib\libLLVMHexagonCodeGen.a
[2628/3025] Building CXX object tools/lli/CMakeFiles/lli.dir/lli.cpp.obj
[2629/3025] Linking CXX executable bin\llvm-profdata.exe
[2630/3025] Linking CXX static library lib\libLLVMPasses.a
ninja: build stopped: subcommand failed.
command did not execute successfully, got: exit code: 1


build script failed, must exit now', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.48\src\lib.rs:975:5
 finished in 237.369 seconds
Build completed unsuccessfully in 0:05:17
Build completed unsuccessfully in 0:05:17
make: *** [Makefile:80: ci-mingw-subset-2] Error 1

@bors
Copy link
Contributor

bors commented Jan 31, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing a64ef7d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 31, 2023
@bors bors merged commit a64ef7d into rust-lang:master Jan 31, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 31, 2023
@davidtwco davidtwco deleted the translation-incremental branch January 31, 2023 13:22
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a64ef7d): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.0% [-2.4%, -1.3%] 3
Improvements ✅
(secondary)
-2.2% [-5.1%, -0.5%] 19
All ❌✅ (primary) -0.9% [-2.4%, 2.3%] 4

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.1% [-2.1%, -2.1%] 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. 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.

None yet