Skip to content

Add *_value methods to proc_macro lib - #136355

Merged
bors merged 10 commits into
rust-lang:masterfrom
GuillaumeGomez:proc-macro_add_value_retrieval_methods
Mar 17, 2025
Merged

Add *_value methods to proc_macro lib#136355
bors merged 10 commits into
rust-lang:masterfrom
GuillaumeGomez:proc-macro_add_value_retrieval_methods

Conversation

@GuillaumeGomez

@GuillaumeGomezGuillaumeGomez commented Jan 31, 2025

Copy link
Copy Markdown
Member

This is the implementation of rust-lang/libs-team#459.

It allows to get the actual value (unescaped) of the different string literals.

Part of #136652.

r? libs-api

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 31, 2025
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

I opened a thread on zulip on how to correctly integrate this new lib into bootstrap build process.

Comment threadsrc/literal-escaper/Cargo.toml Outdated
Comment threadlibrary/proc_macro/Cargo.toml Outdated
Comment threadsrc/literal-escaper/README.md Outdated
@GuillaumeGomez
GuillaumeGomezforce-pushed the proc-macro_add_value_retrieval_methods branch from f9e8cc5 to 5c5ed38CompareJanuary 31, 2025 21:14
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
GuillaumeGomezforce-pushed the proc-macro_add_value_retrieval_methods branch from 5c5ed38 to 27ab932CompareJanuary 31, 2025 22:13
@rustbotrustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jan 31, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
GuillaumeGomezforce-pushed the proc-macro_add_value_retrieval_methods branch from f86a30d to 75aeabfCompareJanuary 31, 2025 22:54
@rust-log-analyzer

This comment has been minimized.

@rustbotrustbot added the A-tidy Area: The tidy tool label Jan 31, 2025
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
GuillaumeGomezforce-pushed the proc-macro_add_value_retrieval_methods branch from cf52b9f to e71c43bCompareJanuary 31, 2025 23:33
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

I don't see how to fix this failure. I'll wait for someone from @rust-lang/bootstrap to take a look.

Apart from this, seems the PR is mostly ready. :)

@onur-ozkanonur-ozkan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just a tiny suggestion, LGTM otherwise

Comment threadsrc/bootstrap/src/core/metadata.rs
@onur-ozkan

onur-ozkan commented Feb 1, 2025

Copy link
Copy Markdown
Contributor

just a tiny suggestion, LGTM otherwise

Oh, tests are failing on bootstrap (due to "literal-escaper" if check)..

@GuillaumeGomez
GuillaumeGomezforce-pushed the proc-macro_add_value_retrieval_methods branch from e71c43b to 774a25cCompareFebruary 3, 2025 22:10
@GuillaumeGomez
GuillaumeGomez marked this pull request as ready for review February 4, 2025 10:04
@rustbot

Copy link
Copy Markdown
Collaborator

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.

The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

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.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

PR is now ready for review!

@bors

bors commented Feb 6, 2025

Copy link
Copy Markdown
Collaborator

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

@GuillaumeGomez
GuillaumeGomezforce-pushed the proc-macro_add_value_retrieval_methods branch from 774a25c to 1d10d7bCompareFebruary 6, 2025 18:33
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Fixed merge conflicts.

@bors

bors commented Mar 18, 2025

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 Mar 18, 2025
@jhpratt

Copy link
Copy Markdown
Member

@bors r-

already merged, bors!

@borsbors 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 Mar 18, 2025
@RalfJung

Copy link
Copy Markdown
Member

I think this PR broke the rustc-src package:

$ cargo metadata --format-version 1 --manifest-path /home/runner/.rustup/toolchains/miri/lib/rustlib/rustc-src/rust/compiler/rustc/Cargo.toml
Updating crates.io index
error: failed to get `literal-escaper` as a dependency of package `rustc_ast v0.0.0 (/home/runner/.rustup/toolchains/miri/lib/rustlib/rustc-src/rust/compiler/rustc_ast)`
... which satisfies path dependency `rustc_ast` of package `rustc_codegen_ssa v0.0.0 (/home/runner/.rustup/toolchains/miri/lib/rustlib/rustc-src/rust/compiler/rustc_codegen_ssa)`
... which satisfies path dependency `rustc_codegen_ssa` of package `rustc-main v0.0.0 (/home/runner/.rustup/toolchains/miri/lib/rustlib/rustc-src/rust/compiler/rustc)`
Caused by:
failed to load source for dependency `literal-escaper`
Caused by:
Unable to update /home/runner/.rustup/toolchains/miri/lib/rustlib/rustc-src/rust/library/literal-escaper
Caused by:
failed to read `/home/runner/.rustup/toolchains/miri/lib/rustlib/rustc-src/rust/library/literal-escaper/Cargo.toml`

@RalfJung

Copy link
Copy Markdown
Member

I made an issue for this: #138647

RalfJung added a commit to RalfJung/rust that referenced this pull request Mar 18, 2025
…add_value_retrieval_methods, r=Amanieu"
This reverts commit 08dfbf4, reversing
changes made to 10bcdad.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 18, 2025
…r=petrochenkov
Revert: Add *_value methods to proc_macro lib
This reverts rust-lang#136355. That PR caused unexpected breakage:
- the rustc-dev component can no longer be loaded by cargo, which impacts Miri and clippy and likely others
- rustc_lexer can no longer be published to crates.io, which impacts RA
See rust-lang#138647 for context.
Cc `@GuillaumeGomez` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 18, 2025
…r=petrochenkov
Revert: Add *_value methods to proc_macro lib
This reverts rust-lang#136355. That PR caused unexpected breakage:
- the rustc-dev component can no longer be loaded by cargo, which impacts Miri and clippy and likely others
- rustc_lexer can no longer be published to crates.io, which impacts RA
See rust-lang#138647 for context.
Cc `@GuillaumeGomez` `@Amanieu`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 19, 2025
…, r=petrochenkov
Revert: Add *_value methods to proc_macro lib
This reverts rust-lang#136355. That PR caused unexpected breakage:
- the rustc-dev component can no longer be loaded by cargo, which impacts Miri and clippy and likely others
- rustc_lexer can no longer be published to crates.io, which impacts RA
See rust-lang#138647 for context.
Cc `@GuillaumeGomez` `@Amanieu`
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2025
Rollup merge of rust-lang#138661 - RalfJung:revert-rustc-dev-breakage, r=petrochenkov
Revert: Add *_value methods to proc_macro lib
This reverts rust-lang#136355. That PR caused unexpected breakage:
- the rustc-dev component can no longer be loaded by cargo, which impacts Miri and clippy and likely others
- rustc_lexer can no longer be published to crates.io, which impacts RA
See rust-lang#138647 for context.
Cc `@GuillaumeGomez` `@Amanieu`
github-actionsBot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Mar 20, 2025
…chenkov
Revert: Add *_value methods to proc_macro lib
This reverts rust-lang/rust#136355. That PR caused unexpected breakage:
- the rustc-dev component can no longer be loaded by cargo, which impacts Miri and clippy and likely others
- rustc_lexer can no longer be published to crates.io, which impacts RA
See rust-lang/rust#138647 for context.
Cc `@GuillaumeGomez` `@Amanieu`
github-actionsBot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 26, 2025
…e_retrieval_methods, r=Amanieu
Add `*_value` methods to proc_macro lib
This is the implementation of rust-lang/libs-team#459.
It allows to get the actual value (unescaped) of the different string literals.
Part of rust-lang#136652.
r? libs-api
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 2, 2025
…add_value_retrieval_methods, r=Amanieu"
This reverts commit 08dfbf4, reversing
changes made to 10bcdad.
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 2, 2025
…, r=petrochenkov
Revert: Add *_value methods to proc_macro lib
This reverts rust-lang#136355. That PR caused unexpected breakage:
- the rustc-dev component can no longer be loaded by cargo, which impacts Miri and clippy and likely others
- rustc_lexer can no longer be published to crates.io, which impacts RA
See rust-lang#138647 for context.
Cc `@GuillaumeGomez` `@Amanieu`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 6, 2025
…r=Urgau
Add `*_value` methods to proc_macro lib
This is the (re-)implementation of rust-lang/libs-team#459.
It allows to get the actual value (unescaped) of the different string literals.
It was originally done in rust-lang#136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation.
Part of rust-lang#136652.
Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/
r? `@Urgau`
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 6, 2025
Rollup merge of rust-lang#139367 - GuillaumeGomez:proc-macro-values, r=Urgau
Add `*_value` methods to proc_macro lib
This is the (re-)implementation of rust-lang/libs-team#459.
It allows to get the actual value (unescaped) of the different string literals.
It was originally done in rust-lang#136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation.
Part of rust-lang#136652.
Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/
r? `@Urgau`
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 11, 2025
…r=Urgau
Add `*_value` methods to proc_macro lib
This is the (re-)implementation of rust-lang/libs-team#459.
It allows to get the actual value (unescaped) of the different string literals.
It was originally done in rust-lang#136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation.
Part of rust-lang#136652.
Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/
r? `@Urgau`
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Apr 28, 2025
Add `*_value` methods to proc_macro lib
This is the (re-)implementation of rust-lang/libs-team#459.
It allows to get the actual value (unescaped) of the different string literals.
It was originally done in rust-lang/rust#136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation.
Part of rust-lang/rust#136652.
Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/
r? `@Urgau`
@GuillaumeGomezGuillaumeGomez mentioned this pull request Dec 11, 2025
24 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tidyArea: The tidy toolS-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)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.

14 participants

@GuillaumeGomez@rust-log-analyzer@onur-ozkan@rustbot@bors@m-ou-se@Amanieu@jhpratt@RalfJung@cuviper@klensy@Veykril@bjorn3@joshtriplett