Skip to content

update to literal-escaper 0.0.4 for better API without unreachable and faster string parsing #140999

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

hkBst
Copy link
Member

@hkBst hkBst commented May 14, 2025

This is the replacement for just the part of #138163 dealing with the changed API of unescape functionality, since that got moved into its own crate.

This uses an unpublished version of literal-escaper (rust-lang/literal-escaper#8).

r? @nnethercote

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 14, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 16, 2025

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

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 16, 2025
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 29, 2025

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

@rust-cloud-vms rust-cloud-vms bot force-pushed the update-escaper branch 2 times, most recently from 97904bd to ba27e2d Compare June 13, 2025 09:59
@hkBst hkBst changed the title literal-escaper v0.0.2 => v0.0.3 for better API without unreachable update to literal-escaper 0.0.4 for better API without unreachable and faster string parsing Jun 13, 2025
@rust-log-analyzer

This comment has been minimized.

@hkBst hkBst marked this pull request as ready for review June 13, 2025 12:35
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 13, 2025

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@GuillaumeGomez
Copy link
Member

Let's run a perf check then.

@bors try @rust-timer queue

@rust-log-analyzer

This comment has been minimized.

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 13, 2025
@bors
Copy link
Collaborator

bors commented Jun 13, 2025

⌛ Trying commit c15bc48 with merge 74c9a54...

bors added a commit that referenced this pull request Jun 13, 2025
update to literal-escaper 0.0.4 for better API without `unreachable` and faster string parsing

This is the replacement for just the part of #138163 dealing with the changed API of unescape functionality, since that got moved into its own crate.

This is a draft, because it uses an unpublished version of literal-escaper (rust-lang/literal-escaper#8). To test, clone literal-escaper into a folder next to rustc, and test rustc normally.

r? `@nnethercote`
@lnicola
Copy link
Member

lnicola commented Jun 13, 2025

Please file the rust-analyzer parts upstream once it's released, if possible.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Jun 13, 2025

💔 Test failed - checks-actions

rustc-std-workspace-core = { path = 'rustc-std-workspace-core' }
rustc-std-workspace-alloc = { path = 'rustc-std-workspace-alloc' }
rustc-std-workspace-std = { path = 'rustc-std-workspace-std' }
compiler_builtins = { path = "compiler-builtins/compiler-builtins" }

# rustc-literal-escaper = { path = '../../literal-escaper/' }
Copy link
Contributor

Choose a reason for hiding this comment

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

This is unnecessary.

@nnethercote
Copy link
Contributor

Just need to fix the patch lines.

@hkBst
Copy link
Member Author

hkBst commented Jun 23, 2025

Just need to fix the patch lines.

Done.

@nnethercote
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 23, 2025

📌 Commit 707a6f5 has been approved by nnethercote

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 Jun 23, 2025
@hkBst
Copy link
Member Author

hkBst commented Jun 24, 2025

@rustbot labels -A-tidy

@rustbot rustbot removed the A-tidy Area: The tidy tool label Jun 24, 2025
@workingjubilee
Copy link
Member

@bors r+ p=5

@bors
Copy link
Collaborator

bors commented Jun 24, 2025

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Jun 24, 2025

📌 Commit 707a6f5 has been approved by workingjubilee

It is now in the queue for this repository.

@tgross35
Copy link
Contributor

(just adding Nick back to the reviewers)

@bors r=nnethercote,workingjubilee

@bors
Copy link
Collaborator

bors commented Jun 24, 2025

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Jun 24, 2025

📌 Commit 707a6f5 has been approved by nnethercote,workingjubilee

It is now in the queue for this repository.

@workingjubilee
Copy link
Member

( oh right, brainslip. )

@workingjubilee
Copy link
Member

and to clarify I didn't review this, I just briefly imagined an entirely different way that r+ works.

@bors r=nnethercote

@bors
Copy link
Collaborator

bors commented Jun 25, 2025

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Jun 25, 2025

📌 Commit 707a6f5 has been approved by nnethercote

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jun 25, 2025

⌛ Testing commit 707a6f5 with merge 2c2bb99...

@bors
Copy link
Collaborator

bors commented Jun 25, 2025

☀️ Test successful - checks-actions
Approved by: nnethercote
Pushing 2c2bb99 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 25, 2025
@bors bors merged commit 2c2bb99 into rust-lang:master Jun 25, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jun 25, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3de5b08 (parent) -> 2c2bb99 (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 2c2bb995af398383e3b93b859302bdc447ca7a7c --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 6282.2s -> 8074.8s (28.5%)
  2. x86_64-apple-2: 4241.3s -> 5186.3s (22.3%)
  3. aarch64-apple: 4408.5s -> 5093.4s (15.5%)
  4. dist-android: 2460.9s -> 2130.5s (-13.4%)
  5. dist-aarch64-apple: 6100.4s -> 5388.1s (-11.7%)
  6. dist-ohos-x86_64: 3984.9s -> 4400.7s (10.4%)
  7. mingw-check-2: 2128.4s -> 1958.6s (-8.0%)
  8. dist-x86_64-windows-gnullvm: 5364.3s -> 5784.5s (7.8%)
  9. x86_64-msvc-ext3: 6244.7s -> 5801.0s (-7.1%)
  10. dist-aarch64-windows-gnullvm: 4376.6s -> 4663.7s (6.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@hkBst hkBst deleted the update-escaper branch June 25, 2025 05:22
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2c2bb99): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.3%] 3
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-1.2%, -0.4%] 16
All ❌✅ (primary) 0.2% [0.2%, 0.3%] 3

Max RSS (memory usage)

Results (primary 1.1%, secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
3.9% [1.5%, 6.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.6% [-7.6%, -7.6%] 1
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

Cycles

Results (primary -2.8%, secondary 4.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.7% [4.6%, 4.9%] 2
Improvements ✅
(primary)
-2.8% [-3.8%, -1.9%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.8% [-3.8%, -1.9%] 5

Binary size

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

Bootstrap: 690.192s -> 689.044s (-0.17%)
Artifact size: 372.07 MiB -> 372.03 MiB (-0.01%)

flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 26, 2025
update to literal-escaper 0.0.4 for better API without `unreachable` and faster string parsing

This is the replacement for just the part of rust-lang#138163 dealing with the changed API of unescape functionality, since that got moved into its own crate.

<del>This uses an unpublished version of literal-escaper (https://github.com/rust-lang/literal-escaper/pull/8).</del>

r? `@nnethercote`
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. perf-regression Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.