Skip to content

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

Merged
bors merged 3 commits into
rust-lang:masterfrom
Xiretza:fluent-mandate-crate-prefix
Aug 24, 2022
Merged

fluent: mandate slug names to be prefixed by crate name#100675
bors merged 3 commits into
rust-lang:masterfrom
Xiretza:fluent-mandate-crate-prefix

Conversation

@Xiretza

Copy link
Copy Markdown
Contributor

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.

@rustbotrustbot 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
Copy Markdown
Contributor

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 17, 2022
@Xiretza

Copy link
Copy Markdown
ContributorAuthor

r? @davidtwco

Comment threadcompiler/rustc_macros/src/diagnostics/fluent.rs Outdated
@davidtwcodavidtwco 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
Xiretzaforce-pushed the fluent-mandate-crate-prefix branch from 6a8b9a8 to 732186aCompareAugust 17, 2022 11:16

@davidtwcodavidtwco left a comment

Copy link
Copy Markdown
Member

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
Xiretzaforce-pushed the fluent-mandate-crate-prefix branch from 732186a to 0c7da94CompareAugust 22, 2022 06:54
@Xiretza
Xiretza marked this pull request as ready for review August 22, 2022 06:54
@rustbot

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

bors commented Aug 22, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 0c7da94 has been approved by davidtwco

It is now in the queue for this repository.

@borsbors 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

bors commented Aug 23, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 0c7da94 with merge ffca88de1637a226dca4fa4f143662c3fe1cc92f...

@bors

bors commented Aug 23, 2022

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@borsbors 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
Copy Markdown
Member

@bors retry - seems spurious

@borsbors 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

bors commented Aug 23, 2022

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Aug 23, 2022

Copy link
Copy Markdown
Collaborator

💥 Test timed out

@borsbors 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
Copy Markdown
Member

@bors retry

@borsbors 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
Copy Markdown
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

bors commented Aug 23, 2022

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Aug 24, 2022

Copy link
Copy Markdown
Collaborator

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

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Aug 24, 2022
@bors
bors merged commit 87991d5 into rust-lang:masterAug 24, 2022
@rustbotrustbot added this to the 1.65.0 milestone Aug 24, 2022
@rust-timer

Copy link
Copy Markdown
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.

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

mean1rangecount2
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 change2

  2. number of relevant changes2

@Xiretza
Xiretza deleted the fluent-mandate-crate-prefix branch August 24, 2022 07:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-translationArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticmerged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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

@Xiretza@rust-highfive@rust-log-analyzer@bors@rustbot@davidtwco@rust-timer@oli-obk