-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Handle git info in rustbuild differently #43771
Copy link
Copy link
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Type
Fields
Give feedbackNo fields configured for issues without a type.
Right now we encode git information directly into the rustc binary that we build during the normal build process, and this information powers
rustc -vVand such. At this time, however, this git information is loaded from the git repository every time you execute./x.py build. Consequently, whenever a new commit is made, lots of rustc libs need to be rebuilt!My personal workflow consists of making commits over time as I fix things (especially tests), and having everything get rebuilt every time I make a commit is a bit of a bummer! I think a better strategy here would be to cache git information from the first time of invocation of rustbuild into the out directory. That way we keep reporting the same commit (even though it may not exist or be the actual commit) when there's a persisted build directory.
I believe a strategy like this won't affect the builds on CI, but may hopefully improve the developer experience!