-
Notifications
You must be signed in to change notification settings - Fork 78
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
[FEATURE]: #2140: Add ArenaInfoPanel #2141
base: master
Are you sure you want to change the base?
Conversation
a431b83
to
244f897
Compare
@@ -28,6 +28,7 @@ plugins { | |||
id "com.github.breadmoirai.github-release" version "2.5.2" | |||
id "com.install4j.gradle" version "9.0.6" | |||
id "org.barfuin.gradle.taskinfo" version "2.1.0" | |||
id "io.freefair.lombok" version "8.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a bit late to the party, but I am not super keen on adding a dependency to lombok in HO. Could this be turned into Java records, or better still use Kotlin? We have been trying to move to Kotlin in recent times, and the language would naturally offer those facilities.
Generally speaking we are trying to keep new dependencies to a minimum, to keep HO size in check, but also because it's proved difficult to maintain over the years.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi :-)
I see. ;-)
I am not familiar with Kotlin but with Java and Lombok.
The question is how to make to code better maintainable and understandable in general.
One thing is that whenever I see a getter and setter that is the standard implementation it may be annotated with the annotations @Getter
and @Setter
from Lombok.
This makes the code easy to read and prevents superfluous code.
I see the use of Lombok in that case as a step in between to the shift to Kotlin.
It makes it clear that the getter and setter can be moved to Kotlin easily and in the time between and it reduces superfluous code to read and maintain while making it not necessary to move everything to Kotlin in one step.
Beside that there are 42 files in Kotlin and 888 in Java.
So Kotlin is only 4,5% of the files (not lines).
When do you think is the move to Kotlin finished? Is that a long term goal?
Does the size of the library really matters?
I have to think about it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably a very subjective matter, I do not think getters and setters are that much of a readability issue vs annotations. It is a tradeoff, and between adding a new dependency and living with boilerplate code, my preference goes to the latter. This is mostly due to issues we've previously had with third-party dependencies maintenance. In any case Java records are a good Java alternative for the same problem, I think. And they come with yummy immutability. ;-)
On the Kotlin question, we have tried to implement new features using Kotlin to make that transition more progressive. I had started the big bang approach of converting the code to Kotlin, but @wsbrenk suggested that we should add unit tests as part of the migration, which obviously made things more difficult: as you probably noticed, testability is a major pain point in HO, due to these massive singletons that are everywhere. This is something I had started to look into, but never really had the time to address further...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(BTW, I meant to say, IntelliJ is your friend for both Lombok -- converting back and forth between annotations and accessors -- and Kotlin from and to Java)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't dare to decide this here because I'm neither our biggest java nor kotlin expert. However, I like Sébastien's suggestion to port to kotlin, because I can imagine that it could be possible to support androids in the medium term.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sgcr, very good job.
dfdc1a5
to
36ca4da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it is fine now - I don't want to decide about lombok or not...
33d31a8
to
f63d6a5
Compare
Good :) See also my comment regarding Java records with the last commit. The pull requests: #2145 and #2143 should be reviewed and merged first because they are partly included here but separate general things. I would like to rebase this PR here then. |
c43d4b0
to
ebda775
Compare
125aed8
to
8e04966
Compare
b91005e
to
aa4e757
Compare
aa4e757
to
0ed42f9
Compare
Can be merged. |
5d3e17a
to
bf16512
Compare
changes proposed in this pull request:
src/main/resources/release_notes.md
...