Skip to content

Conversation

ken-matsui
Copy link
Contributor

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Feb 13, 2025

r? @oli-obk

rustbot has assigned @oli-obk.
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. labels Feb 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 13, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

@rust-log-analyzer

This comment has been minimized.

@ken-matsui ken-matsui force-pushed the import-target-metadata branch from 78f4703 to d76640b Compare February 13, 2025 01:16
@rustbot
Copy link
Collaborator

rustbot commented Feb 13, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

@oli-obk
Copy link
Contributor

oli-obk commented Feb 13, 2025

I don't see the benefit of importing something that is only used once over using the full path. Either solution seems fine, but changing a lot of code just to pick one option over the other is missing a rationale for me. Can you explain the reason for it? Was there some discussion about further changes that may benefit from doing this now?

@ken-matsui
Copy link
Contributor Author

I don't see the benefit of importing something that is only used once over using the full path. Either solution seems fine, but changing a lot of code just to pick one option over the other is missing a rationale for me. Can you explain the reason for it? Was there some discussion about further changes that may benefit from doing this now?

With that idea, I think other identifiers like TargetOptions should also be a fully qualified names. There wasn't such a discussion, but I didn't feel it was reasonable to keep the inconsistency while I was writing a new target. Every time someone creates a PR to add a new target, will you guys instruct them to make TargetOptions imported but TargetMetadata an FQN? I would say my change makes sense to prevent future contributors from being confused.

@bors
Copy link
Collaborator

bors commented Feb 15, 2025

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

@workingjubilee
Copy link
Member

I agree it's super inconsistent right now, so I am in favor of churning it one way or the other.

@oli-obk
Copy link
Contributor

oli-obk commented Feb 15, 2025

Makes sense, but someone who actually knows about rustc_target should review this or make a decision in either direction. Who'd be a good person to assign?

@ken-matsui
Copy link
Contributor Author

While assigning someone, allow me to put my two cents in on the direction. If we go with FQNs, we'll have crate::spec::TargetOptions and crate::spec::TargetMetadata, which sound redundant. Having just TargetOptions and TargetMetadata looks clearer to me even if they are used once. Just my two cents - the assignee should ultimately decide, of course.

@workingjubilee
Copy link
Member

ah, well, rustc_target-knower speaking

@workingjubilee
Copy link
Member

I believe the TargetMetadata was introduced by @Noratrieb.

I think importing it in all specs so all specs look consistent on this point is fine, but if @Noratrieb has a strong opinion on this another way I'm somewhat inclined to defer to her.

@Noratrieb
Copy link
Member

I used an absolute path because I could not be bothered to add an additional import while touching like 300 files.

@workingjubilee
Copy link
Member

I figured so!

Yeah, @ken-matsui rebase this?

@ken-matsui ken-matsui force-pushed the import-target-metadata branch from d76640b to b660382 Compare February 16, 2025 22:58
@workingjubilee
Copy link
Member

workingjubilee commented Feb 16, 2025

bitrot-prone (but probably actually fine to roll up)

@bors r+ p=1 rollup

@bors
Copy link
Collaborator

bors commented Feb 16, 2025

📌 Commit b660382 has been approved by workingjubilee

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 Feb 16, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Feb 16, 2025
… r=workingjubilee

rustc_target: import TargetMetadata
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 17, 2025
…kingjubilee

Rollup of 12 pull requests

Successful merges:

 - rust-lang#136671 (Overhaul `rustc_middle::limits`)
 - rust-lang#136817 (Pattern Migration 2024: clean up and comment)
 - rust-lang#136844 (Use `const_error!` when possible)
 - rust-lang#136953 (rustc_target: import TargetMetadata)
 - rust-lang#137095 (Replace some u64 hashes with Hash64)
 - rust-lang#137100 (HIR analysis: Remove unnecessary abstraction over list of clauses)
 - rust-lang#137105 (Restrict DerefPure for Cow<T> impl to T = impl Clone, [impl Clone], str.)
 - rust-lang#137120 (Enable `relative-path-include-bytes-132203` rustdoc-ui test on Windows)
 - rust-lang#137125 (Re-add missing empty lines in the releases notes)
 - rust-lang#137140 (Fix const items not being allowed to be called `r#move` or `r#static`)
 - rust-lang#137145 (use add-core-stubs / minicore for a few more tests)
 - rust-lang#137149 (Remove SSE ABI from i586-pc-windows-msvc)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Feb 17, 2025

⌛ Testing commit b660382 with merge d5eb31c...

@bors
Copy link
Collaborator

bors commented Feb 17, 2025

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing d5eb31c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 17, 2025
@bors bors merged commit d5eb31c into rust-lang:master Feb 17, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 17, 2025
@ken-matsui ken-matsui deleted the import-target-metadata branch February 17, 2025 05:34
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d5eb31c): 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 (secondary -3.8%)

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary -2.8%)

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-3.9%, -2.2%] 19
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 789.602s -> 789.735s (0.02%)
Artifact size: 350.17 MiB -> 350.22 MiB (0.02%)

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