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

Remove check_merge_commits test #12829

Merged
merged 3 commits into from
Jul 20, 2022

Conversation

fasterthanlime
Copy link
Contributor

@fasterthanlime fasterthanlime commented Jul 20, 2022

Due to the way "git subtree" works, the check_merge_commits test will find merge commits and fail, so we simply skip it.

This changed is tracked in:

Maintainer impact: none

This adds an `in-rust-tree` feature that will be enabled when
rust-analyzer is built from `rust-lang/rust`. Due to the way
"git subtree" works, that test _will_ find merge commits and
fail, so we simply skip it.
Rationale: Merge commits will probably end up in
`rust-lang/rust-analyzer` when doing "rust=>ra" syncs anyway.

It could be changed to only check for merge commits in non-sync PRs,
but it's "probably not worth the hassle"
Since it's unused for now -it'll be re-introduced along with the
upcoming `proc-macro-srv/sysroot` feature.
@fasterthanlime fasterthanlime changed the title Allow merge commits when 'in-rust-tree' feature is enabled Remove check_merge_commits test Jul 20, 2022
@Veykril
Copy link
Member

Veykril commented Jul 20, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Jul 20, 2022

📌 Commit 244f29b has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 20, 2022

⌛ Testing commit 244f29b with merge bd4439f...

@bors
Copy link
Contributor

bors commented Jul 20, 2022

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing bd4439f to master...

@bors bors merged commit bd4439f into rust-lang:master Jul 20, 2022
@jonas-schievink
Copy link
Contributor

Could you elaborate on why this was done?

The reason we want to avoid merge commits not authored by bors is that they make the history hard to read since they are mostly just noise that a proper rebase avoids). Newcomers often create many merge commits when updating their PRs (since GitHub strongly encourages it and it's also git's default behavior), so avoiding merge commits there is now responsibility of the maintainers instead of an automated check. This PR does not acknowledge that and claims that there is no maintainer impact. Do we not want to avoid merge commits anymore?

Is there anything that could be done to detect and mark merge commits coming from git-subtree? I am not clear about why using subtrees means that we have to deal with merge commits.

@fasterthanlime
Copy link
Contributor Author

Could you elaborate on why this was done?

I forgot who "signed off" on this change, and whether it happened on Zulip or GitHub.

I'm aware of the reasons to want to avoid merge commits, and I suppose there might be a way to bring the check back in some form. I would have to dive into this again, but off the top of my head: I feel like the merge commits created by syncs might not be authored by bors (but by whoever is opening the sync PR), which seems like it would complicate the check somewhat.

Is there anything that could be done to detect and mark merge commits coming from git-subtree?

Anyone who's interested in bringing back that check can look at https://github.com/rust-lang/rust-analyzer/pull/12871/commits for an example of a sync.

@Veykril
Copy link
Member

Veykril commented Aug 31, 2022

Ye the merge commit seems to come from the author, that seems unfortunate...

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.

4 participants