Skip to content

refactor(install): simplify InstallMethod methods, pt. 2 - #5083

Merged
rami3l merged 8 commits into
rust-lang:mainfrom
rami3l:refactor/install-method-cleanup-2
Sep 16, 2026
Merged

rami3l merged 8 commits into
rust-lang:mainfrom
rami3l:refactor/install-method-cleanup-2

Conversation

@rami3l

@rami3l rami3l commented Sep 15, 2026

Copy link
Copy Markdown
Member

Part of rust-lang/goals#736.

This is a simple follow-up of #5081. As usual, only inlining and deduplication are involved.

However, I might not further simplify this API from here, because there will be more stuff to be returned from .install() later on, notably the stale object to be garbage collected...

@rami3l
rami3l force-pushed the refactor/install-method-cleanup-2 branch 2 times, most recently from 720323f to 7924472 Compare September 15, 2026 16:34
@rami3l
rami3l marked this pull request as draft September 15, 2026 16:36
@rami3l
rami3l force-pushed the refactor/install-method-cleanup-2 branch 2 times, most recently from c878d40 to 9558600 Compare September 15, 2026 16:53
@rami3l
rami3l requested a review from djc September 15, 2026 16:54
@rami3l
rami3l marked this pull request as ready for review September 15, 2026 16:54
@rami3l
rami3l force-pushed the refactor/install-method-cleanup-2 branch 2 times, most recently from c466c32 to d429f0d Compare September 15, 2026 17:16
@djc

djc commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

image

Here's one reason I'm not a big fan of your commit message style.

@rami3l

rami3l commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

@djc I agree I could have been more succinct in composing my commit messages. I've just shortened them to be below 70 letters each. If you would like to suggest a general style and/or a length limit for the first line (for example, you may want to keep the most important messages upfront as you have done with the function parameters so that it may be easier for you to review on the particular client you are using), please feel free to let me know :)

That said, I'm still surprised by the bad presentation here. It looks like this on my mobile:

image

@rami3l
rami3l force-pushed the refactor/install-method-cleanup-2 branch from d429f0d to ed16a9a Compare September 15, 2026 21:35
@rami3l rami3l changed the title refactor(toolchain/distributable): simplify InstallMethod methods, pt. 2 refactor(distributable): simplify InstallMethod methods, pt. 2 Sep 15, 2026
@rami3l
rami3l force-pushed the refactor/install-method-cleanup-2 branch from ed16a9a to 325f683 Compare September 15, 2026 21:50
@rustbot

rustbot commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rami3l rami3l changed the title refactor(distributable): simplify InstallMethod methods, pt. 2 refactor(install): simplify InstallMethod methods, pt. 2 Sep 15, 2026
@djc

djc commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@djc I agree I could have been more succinct in composing my commit messages. I've just shortened them to be below 70 letters each. If you would like to suggest a general style and/or a length limit for the first line (for example, you may want to keep the most important messages upfront as you have done with the function parameters so that it may be easier for you to review on the particular client you are using), please feel free to let me know :)

I think if you're going to stick with "Conventional Commits"-style messages, you should never use a two-segment scope style. Personally, I don't like the conventional commits style, here's a recent blog post arguing against it:

https://sumnerevans.com/posts/software-engineering/stop-using-conventional-commits/

Comment thread src/install.rs Outdated
@rami3l

rami3l commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

Personally, I don't like the conventional commits style

@djc Thanks for voicing your opinions on this. For now I don't think it's practical to enforce a commit message style or format, but I will try my best to avoid long prefixes and keep the message length to 50 chars or so.

here's a recent blog post arguing against it:

sumnerevans.com/posts/software-engineering/stop-using-conventional-commits

I have already read that blog post so I see your point, but I still have my reservations on this topic. From my personal experience, this is sometimes helpful with changelogs and backports (especially when I want to distinguish unexpected breakages from refactoring patches and intended breakages from features).

@djc

djc commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@djc Thanks for voicing your opinions on this. For now I don't think it's practical to enforce a commit message style or format, but I will try my best to avoid long prefixes and keep the message length to 50 chars or so.

I think keeping the message length to 50 chars is actually an anti-pattern -- it's good to make use of the full 70 or so chars for the first line, but not by filling it with repetitive boilerplate.

I have already read that blog post so I see your point, but I still have my reservations on this topic. From my personal experience, this is sometimes helpful with changelogs and backports (especially when I want to distinguish unexpected breakages from refactoring patches and intended breakages from features).

I understand that part, but IIRC the convention allows the simple use of ! to denote incompatible changes -- so those don't actually need to take up a lot of space?

@rami3l

rami3l commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

but IIRC the convention allows the simple use of ! to denote incompatible changes -- so those don't actually need to take up a lot of space?

No it doesn't, I agree as I've said above that my previous prefix was too long.

I think keeping the message length to 50 chars is actually an anti-pattern -- it's good to make use of the full 70 or so chars for the first line, but not by filling it with repetitive boilerplate.

I am thinking about like around 50 without the prefix and in total it should be around 70. So I guess we are on the same page here.

@rami3l
rami3l added this pull request to the merge queue Sep 16, 2026
Merged via the queue into rust-lang:main with commit e8f8773 Sep 16, 2026
32 checks passed
@rami3l
rami3l deleted the refactor/install-method-cleanup-2 branch September 16, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants