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

Serializable Groovy, Java, Kotlin, and Scala steps #2033

Merged
merged 14 commits into from
Feb 13, 2024
Merged

Conversation

Goooler
Copy link
Member

@Goooler Goooler commented Jan 31, 2024

@Goooler Goooler requested review from nedtwigg and jbduncan and removed request for nedtwigg January 31, 2024 15:50
@Goooler Goooler changed the title Serializable Kotlin steps Serializable Java, Kotlin, and Scala steps Feb 1, 2024
@Goooler Goooler changed the title Serializable Java, Kotlin, and Scala steps Serializable Groovy, Java, Kotlin, and Scala steps Feb 1, 2024
Copy link
Member

@nedtwigg nedtwigg left a comment

Choose a reason for hiding this comment

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

Amazing @Goooler, thanks so much! I'm gonna pull this locally, do some testing, and then merge. Sorry it sat for so long.


import java.io.Serializable;

public interface RoundedStep extends Serializable {}
Copy link
Member

Choose a reason for hiding this comment

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

The intent here is to be a marker interface?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah.

Copy link
Member

Choose a reason for hiding this comment

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

@Goooler My YAGNI senses are tingling! I'm wondering if you can clarify why this interface was introduced, and if we can get away with inlining Serializable instead?

Otherwise, this all LGTM. 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking that we can do some checks based on a common step type instead of names here

} else if (Set.of("black", "buf", "clang", "ktlint", "ktfmt", "scalafmt", "palantir-java-format", "google-java-format",
"removeUnusedImports", "cleanthat", "No line break between type annotation and type",
"importOrder", "Remove unnecessary semicolons").contains(onlyStepName)) {
supportsRoundTrip = true;

Copy link
Member

Choose a reason for hiding this comment

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

That's a good idea, but it's hard to get to that state. I figured it was probably meant as a testing thing, we can remove it when we finish #1274

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good to me either way! 👍

@nedtwigg
Copy link
Member

I added some comments in

If you run the first commit, you'll see the tests fail, and then pass in the second commit. Wanna push those commits into this PR and then I'll press merge?

@Goooler
Copy link
Member Author

Goooler commented Feb 13, 2024

Thanks for your feedback!

@nedtwigg nedtwigg merged commit d026161 into diffplug:main Feb 13, 2024
14 checks passed
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