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

Java optional codegen with final fields #1879

Merged
merged 81 commits into from
Jan 29, 2022

Conversation

aslakhellesoy
Copy link
Contributor

This PR supersedes #1858 with suggestions made by @mpkorstanje in #1858 (comment)

The code compiles, but the tests are failing because the classes don't have an empty constructor. I have enabled <parameters>true</parameters> for the compiler plugin as suggested in #1858 (comment), but it doesn't seem to help.

aslakhellesoy and others added 30 commits January 5, 2022 10:50
messages/java/Makefile Outdated Show resolved Hide resolved
gherkin/CHANGELOG.md Outdated Show resolved Hide resolved
messages/java/Makefile Outdated Show resolved Hide resolved
@mpkorstanje
Copy link
Contributor

mpkorstanje commented Jan 23, 2022

I've cleaned up the public API of gherkin, messages and the html formatter, added null checks. Other then the comments above I don't have anything else that needs to be fixed while we're doing a new major version.

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Jan 29, 2022

Split the files and put the messages back in io.cucumber.messages.types package. This removes a bunch of noise from the diff.

I think we're good, but let's squash merge this. The intermediate commits are very noisy.

@aslakhellesoy aslakhellesoy merged commit d27e618 into main Jan 29, 2022
@aslakhellesoy aslakhellesoy deleted the java-optional-codegen-final-fields branch January 29, 2022 09:24
@aslakhellesoy
Copy link
Contributor Author

Wooot great work @mpkorstanje

mpkorstanje added a commit to cucumber/html-formatter that referenced this pull request Apr 3, 2022
mpkorstanje added a commit to cucumber/html-formatter that referenced this pull request Apr 3, 2022
mpkorstanje added a commit to cucumber/html-formatter that referenced this pull request Apr 3, 2022
mpkorstanje added a commit to cucumber/html-formatter that referenced this pull request Apr 5, 2022
mpkorstanje added a commit to cucumber/cucumber-jvm that referenced this pull request Apr 19, 2022
With cucumber/common#1879 `messages` now uses
`Optional<T>` for optional types avoiding some unexpected null references.
This resulted in some updating of `gherkin` and `html-formatter`.

Additionally with this change the dependency on Jackson has been removed from
`messages`. However we still have to serialize the message objects into json.
So for now Jackson is shaded into `core` instead. And eventually we'll be able
to spin this out to it's own module.
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