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

Implement -L KIND=@RUSTC_BUILTIN/... #121843

Merged
merged 4 commits into from
Mar 27, 2024
Merged

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Mar 1, 2024

@rustbot
Copy link
Collaborator

rustbot commented Mar 1, 2024

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 1, 2024
@Veykril Veykril changed the title Implement -L builtin:$path Implement https://github.com/rust-lang/compiler-team/issues/659 -L builtin:$path Mar 1, 2024
@Veykril Veykril changed the title Implement https://github.com/rust-lang/compiler-team/issues/659 -L builtin:$path Implement -L builtin:$path Mar 1, 2024
@rust-log-analyzer

This comment has been minimized.

src/librustdoc/config.rs Outdated Show resolved Hide resolved
@rust-log-analyzer

This comment has been minimized.

src/librustdoc/config.rs Show resolved Hide resolved
compiler/rustc_session/src/search_paths.rs Outdated Show resolved Hide resolved
compiler/rustc_session/src/search_paths.rs Outdated Show resolved Hide resolved
compiler/rustc_session/src/search_paths.rs Outdated Show resolved Hide resolved
@petrochenkov
Copy link
Contributor

The syntax of the option is a bit weird.
Maybe keep the -L KIND=PATH but add a "magic variable" that would expand into the necessary directory like $ORIGIN in rpaths?
$RUSTC_BUILTIN/foo/bar or something.

Then we'd expand $RUSTC_BUILTIN first, and then pass the result to SearchPath::from_cli_opt as usual.

@petrochenkov petrochenkov 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 5, 2024
@Veykril
Copy link
Member Author

Veykril commented Mar 6, 2024

Zulip bikeshed discussion https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rust-lang.2Fcompiler-team.23659.3A.20.60-L.20builtin.3A.24path.60.20bikeshedding

For now I've adjusted the implementation to allow for a @RUSTC_BUILTIN prefix for the passed path that will be substituted. Substituting in other positions wouldn't make sense as the inserted path is absolute (and as such would create broken paths on some platforms)

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 6, 2024
@petrochenkov
Copy link
Contributor

Implementation LGTM, I'll mark this as waiting on bikeshed for a few days.

@petrochenkov petrochenkov added S-waiting-on-bikeshed Status: Awaiting a decision on trivial things. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 6, 2024
@Veykril Veykril changed the title Implement -L builtin:$path Implement -L KIND=@RUSTC_BUILTIN/... Mar 6, 2024
@bors

This comment was marked as resolved.

@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 Mar 6, 2024
@petrochenkov petrochenkov removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 7, 2024
@bors

This comment was marked as resolved.

@Veykril
Copy link
Member Author

Veykril commented Mar 25, 2024

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 25, 2024
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 26, 2024

📌 Commit 3d65c92 has been approved by petrochenkov

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 Mar 26, 2024
@petrochenkov petrochenkov removed the S-waiting-on-bikeshed Status: Awaiting a decision on trivial things. label Mar 26, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Mar 26, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2024
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#121843 (Implement `-L KIND=`@RUSTC_BUILTIN/...`)`
 - rust-lang#122860 (coverage: Re-enable `UnreachablePropagation` for coverage builds)
 - rust-lang#123021 (Make `TyCtxt::coroutine_layout` take coroutine's kind parameter)
 - rust-lang#123024 (CFI: Enable KCFI testing of run-pass tests)
 - rust-lang#123083 (lib: fix some unnecessary_cast clippy lint)
 - rust-lang#123116 (rustdoc: Swap fields and variant documentations)

r? `@ghost`
`@rustbot` modify labels: rollup
@klensy
Copy link
Contributor

klensy commented Mar 27, 2024

Is there some docs, describing new syntax?

@bors bors merged commit 2973f04 into rust-lang:master Mar 27, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 27, 2024
@bors
Copy link
Contributor

bors commented Mar 27, 2024

⌛ Testing commit 3d65c92 with merge 10a7aa1...

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2024
Rollup merge of rust-lang#121843 - ferrocene:builtin-path, r=petrochenkov

Implement `-L KIND=@RUSTC_BUILTIN/...`

Implements rust-lang/compiler-team#659
@klensy
Copy link
Contributor

klensy commented Mar 27, 2024

⌛ Testing commit 3d65c92 with merge 10a7aa1...

Weird, this already merged?

@tshepang tshepang deleted the builtin-path branch April 1, 2024 05:43
@petrochenkov
Copy link
Contributor

@Veykril
I've just noticed that this feature ended up being insta stable.
Could you make it require -Zunstable-options?

In theory, this should need an FCP to get to stable.
(And maybe some bikeshedding about naming RUSTC_BUILTIN before that.)

@Veykril
Copy link
Member Author

Veykril commented Apr 19, 2024

Sure I can do that next week.
Did this get branched to beta already?

@petrochenkov
Copy link
Contributor

The milestone is 1.79.0, so it looks like it's not in beta yet.

fmease added a commit to fmease/rust that referenced this pull request Apr 23, 2024
… r=petrochenkov

Mark `@RUSTC_BUILTIN` search path usage as unstable

Follow up to rust-lang#121843

r? `@petrochenkov`
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2024
Rollup merge of rust-lang#124285 - ferrocene:unstable-L-rust-builtin, r=petrochenkov

Mark `@RUSTC_BUILTIN` search path usage as unstable

Follow up to rust-lang#121843

r? `@petrochenkov`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants