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

Make consume a record #45450

Closed
wants to merge 4 commits into from
Closed

Make consume a record #45450

wants to merge 4 commits into from

Conversation

punkratz312
Copy link

@punkratz312 punkratz312 commented Jan 8, 2025

This pull request reduces boilerplate code and eliminates unused code, addressing concerns related to code clarity and maintenance.
This change aims to streamline the codebase while maintaining functionality.

This comment was marked as resolved.

@quarkus-bot quarkus-bot bot added the area/core label Jan 8, 2025
@punkratz312 punkratz312 marked this pull request as ready for review January 8, 2025 15:40
@punkratz312 punkratz312 changed the title make consume a record to avoid unused code Make consume a record Jan 8, 2025

This comment has been minimized.

@punkratz312
Copy link
Author

@geoand new we(ek) new we 🍀

its now mergeable right?

@geoand
Copy link
Contributor

geoand commented Jan 14, 2025

its now mergeable right?

If CI is happy, sure

@gastaldi gastaldi added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 14, 2025

This comment has been minimized.

: flags.with(this.flags);
return new Consume(buildStepBuilder, itemId, outputConstraint, outputFlags);
}
public record Consume(BuildStepBuilder buildStepBuilder, ItemId itemId, Constraint constraint, ConsumeFlags flags) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

why is package-private visibility turned into public visibility? Is this class supposed to be used outside of this package with your changes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the reason I didn't merge this yet. I wanted to look at where this is actually used on my machine instead of my phone

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, good finding even twice. thanks

@gastaldi
Copy link
Contributor

Please squash all commits before we trigger CI again

@punkratz312
Copy link
Author

I have a question in mind.

Since I need to squash locally and often run into issues avoiding merge requests, leading to simply creating new PRs, is it possible to adjust the settings to allow squash merging to avoid overhead? Or is the workflow intentionally designed this way?

At OpenRewrite, it's convenient to squash away the work-in-progress commits since they don't matter after the final collaborative commit is ready to be merged into main.

Here's a relevant reference:

@gastaldi
Copy link
Contributor

The workflow is intentionally designed that way, it facilitates the task of backporting commits to other branches

@gastaldi
Copy link
Contributor

Also please take a look at https://github.com/quarkusio/quarkus/blob/main/CONTRIBUTING.md#before-you-contribute to make sure you always rebase and avoid merge commits

@punkratz312
Copy link
Author

Commit 720da1a has 2 parents

Could not Squash Commits

#45591

@quarkus-bot quarkus-bot bot added triage/invalid This doesn't seem right and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels Jan 14, 2025
@gastaldi
Copy link
Contributor

gastaldi commented Jan 14, 2025

git rebase main
git rebase -i HEAD~3
  • Put an f in the front of the all the extra commits
  • Save the file
  • Force push to your branch

asciicast

@punkratz312
Copy link
Author

I appreciate it! I executed it with 5 ^^, but it didn't look right. I only noticed it after the first push, of course.

Let's get this done:
GitHub PR #45591

As long as I don't change it, there's no need to rush—a rebase is possible anytime. Thanks for the support!

@punkratz312
Copy link
Author

Wow, even a video—thanks!

For me, it's faster to handle this by creating a new branch, comparing it with the old one, grabbing the changes, and creating a new commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants