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

fluent: mandate slug names to be prefixed by crate name #100675

Merged
merged 3 commits into from
Aug 24, 2022

Conversation

Xiretza
Copy link
Contributor

@Xiretza Xiretza commented Aug 17, 2022

This is currently only convention, but not actively checked for.

Additionally, improve error messages to highlight the path of the offending fluent file rather than the identifier preceding it.

This will conflict with #100671, so I'll leave it as draft until that's merged.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 17, 2022
@rust-highfive
Copy link
Collaborator

r? @oli-obk

(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 Aug 17, 2022
@Xiretza
Copy link
Contributor Author

Xiretza commented Aug 17, 2022

r? @davidtwco

@rust-highfive rust-highfive assigned davidtwco and unassigned oli-obk Aug 17, 2022
@davidtwco davidtwco added the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Aug 17, 2022
@rust-log-analyzer

This comment was marked as resolved.

@Xiretza Xiretza force-pushed the fluent-mandate-crate-prefix branch from 6a8b9a8 to 732186a Compare August 17, 2022 11:16
Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! r=me once #100671 lands

Example error before:

error: name `generic_does_not_live_long_enough` does not start with the crate name
  --> compiler/rustc_error_messages/src/lib.rs:33:17
   |
33 |     borrowck => "../locales/en-US/borrowck.ftl",
   |     ^^^^^^^^
   |
   = help: prepend `borrowck_` to the slug name: `borrowck_generic_does_not_live_long_enough`

after:

error: name `generic_does_not_live_long_enough` does not start with the crate name
  --> compiler/rustc_error_messages/src/lib.rs:33:17
   |
33 |     borrowck => "../locales/en-US/borrowck.ftl",
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: prepend `borrowck_` to the slug name: `borrowck_generic_does_not_live_long_enough`
@bors

This comment was marked as resolved.

@Xiretza Xiretza force-pushed the fluent-mandate-crate-prefix branch from 732186a to 0c7da94 Compare August 22, 2022 06:54
@Xiretza Xiretza marked this pull request as ready for review August 22, 2022 06:54
@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2022

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

rustc_macros::diagnostics was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

@davidtwco
Copy link
Member

@bors r+ rollup=never (there's a lot of translation pull requests right now, this could cause those to fail, so let's avoid a rollup)

@bors
Copy link
Contributor

bors commented Aug 22, 2022

📌 Commit 0c7da94 has been approved by davidtwco

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 Aug 22, 2022
@bors
Copy link
Contributor

bors commented Aug 23, 2022

⌛ Testing commit 0c7da94 with merge ffca88de1637a226dca4fa4f143662c3fe1cc92f...

@bors
Copy link
Contributor

bors commented Aug 23, 2022

💔 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 Aug 23, 2022
@rust-log-analyzer

This comment was marked as resolved.

@davidtwco
Copy link
Member

@bors retry - seems spurious

@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 Aug 23, 2022
@bors
Copy link
Contributor

bors commented Aug 23, 2022

⌛ Testing commit 0c7da94 with merge 530186becedf0e3662ef19b2e20b1db5fa14384f...

@bors
Copy link
Contributor

bors commented Aug 23, 2022

💥 Test timed out

@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 Aug 23, 2022
@davidtwco
Copy link
Member

@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 Aug 23, 2022
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Aug 23, 2022

⌛ Testing commit 0c7da94 with merge 87991d5...

@bors
Copy link
Contributor

bors commented Aug 24, 2022

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing 87991d5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 24, 2022
@bors bors merged commit 87991d5 into rust-lang:master Aug 24, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 24, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (87991d5): 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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.8% [2.0%, 3.6%] 2
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
-7.5% [-7.5%, -7.5%] 1
All ❌✅ (primary) -2.6% [-2.6%, -2.6%] 1

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.

mean1 range count2
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

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@Xiretza Xiretza deleted the fluent-mandate-crate-prefix branch August 24, 2022 07:23
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.

8 participants