-
Notifications
You must be signed in to change notification settings - Fork 64
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
Ported LFValidator.xtend
to Java
#886
Conversation
The validator is a very important class, and it will be difficult to assure the ported code is functionally correct. I would suggest that before merging this in, we improve code coverage of |
@housengw could you incorporate the following changes in your port please? |
The dummy Xtend file shouldn't be needed if you set |
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 looks great! Due to the size of the Validator, it's not possible to check every line, but I made a quick read through. One issue that I noticed, is that the checkWidthSpec
method disappeared in the Java version.
Also, when opening the java file in IDEA, there is a ton of warnings reported. Many of which suggest code improvements. This is not to say that your code is bad, but more to say that we need to think about our developer setups and what are the recommended tools for working with our code base should be. Luckily, when we don't rely on xtend anymore, we have more options then eclipse :)
Looks great! I wonder if we should delay the task of porting Xtend files that can heavily benefit from Java 17's multi-line strings until after we make the jump Edit: As @lhstrh mentioned here, we might not get to use Java 17 anytime soon. Looking at Xtext's past release cycles, the next next release could be at least 4 months away. So I see the reasoning behind doing this now. |
I think eventually we will anyway need to do another pass over the core classes. There are lots of opportunities for designing the validator in a cleaner and more modular way. In such a go we could also modernize the Java code or, if we don't need to rely on Eclipse for development anymore (which should be the case once we have thrown out all xtend), we could also port the class entirely to Kotlin. With IntelliJ's tools for auto-conversion and code linting, this should be a walk in the park compared to the transition from xtend to java ;) |
Adding a link to my comment in #873. |
I think we should merge this after tagging |
LFValidator.xtend
to javaLFValidator.xtend
to Java
LFValidator.xtend
to JavaLFValidator.xtend
to Java
LFValidator.xtend
to JavaLFValidator.xtend
to Java
see #838