Skip to content

Continue Lambda type annotations #1782

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

Merged
merged 49 commits into from
Sep 28, 2019

Conversation

timtebeek
Copy link
Contributor

@timtebeek timtebeek commented Sep 26, 2019

Continuation of #1768; kept separately for easier review flow. Fixes #1764

mpkorstanje and others added 28 commits September 6, 2019 21:39
#1767)

Based on discussion in cucumber/cucumber-eclipse#373 ticket, added a brief note under 4.5.0 release.
With the introduction of JPMS modules need to declare their dependencies.
Additionally they need to declare which transitive modules their
consumers have to depend on via require transitive. To keep this
structure simple we should remove the need to end users to depend on
`cucumber-core`.

Closes #1760
* Fix typo in vis.min.js.

Use long (millis since epoch) instead of Instant, which
results in a JSON representation that the formatter cannot handle.

* Upgrade to jQuery 3.4.1. Fixes #1759.

* Upgrade to chosen 1.8.7

* Deprecate timeline formatter

* Remove deprecation warning
* Detect JavaDoc errors

* Fix JavaDoc errors

* Removed unused properties
JUnit 5 tests and test classes can be package private. The public
modifier simply adds nothing but ceremony. Cleaning this up will remove
a large number of inspection warnings.
Replace internal utility class with lambda.
Snippet is an interface and defined as part of the backend.
All glue definition classes implemented a `getLocation(boolean detail)`
method. This would provide a long form method description. However
in practice this method was always invoked with true. Removing the
parameter cleans up the API.

This also revealed that `Invoker` is only used for the `timeout` in
`cucumber-java8`. This means that class can be moved to `cucumber-java`
and with that `MethodFormat` can also be moved to `cucumber-java`.
## Summary

With the introduction of v5 we will break the plugin API by moving
packages from `cucumber.core` to `io.cucumber.core`. We can use this
as an opportunity to extract the plugin and event classes to separate
modules.

This change moves `io.cucumber.core.plugin` to `io.cucumber.plugin` and
`io.cucumber.core.event` to `io.cucumber.plugin.event`. While on its own this
change provides little value it will allow us in the future to provide
better support for plugins.

With the introduction of JPMS we will want to expose these classes for
plugin developers. However we also want to avoid the use of core by most
end users. By moving these classes to their own modules we can avoid the
use of core and future proof the introduction of JPMS.

Closes #1773.
Cucumber JUnits xml format doesn't pass XSD validation in the
Jenkins XUnit plugin because it is missing the errors attribute.
Additionally time should be presented using numbers with both decimal
and thousands separators.

From: https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd
Via: https://maven.apache.org/surefire/maven-surefire-plugin/

Closes #1777
Introduces the backend module. With this module backend
implementations only need to use dependencies from
`io.cucumber.core.backend`. This will allow us to introduce the
module system later on 

The implementation is not yet perfect. Classpath scanning and
resource loading is located in other modules. Removing this
depends on #1526 and removal of type registry configurer which
depends on #1768 .

Fixes #1386 because steps can now see if an exception came from
user code or actual backend.
Removes timeout which would close #1695 earlier then expected.
Prints code, name, and native name of supported languages
in a three column list.

```
af              Afrikaans                 Afrikaans
am              Armenian                  հայերեն
ar              Arabic                    العربية
ast             Asturian                  asturianu
az              Azerbaijani               Azərbaycanca
...
lambda-type-annotations

Conflicts:
	java8/src/main/java/io/cucumber/java8/Java8Backend.java
	java8/src/main/java/io/cucumber/java8/LambdaGlue.java
	java8/src/test/java/io/cucumber/java8/Java8LambdaStepDefinitionMarksCorrectStackElementTest.java
	java8/src/test/java/io/cucumber/java8/LambdaGlueTest.java
@timtebeek timtebeek self-assigned this Sep 26, 2019
@mpkorstanje mpkorstanje changed the base branch from lambda-type-annotations to master September 26, 2019 19:07
@coveralls
Copy link

coveralls commented Sep 26, 2019

Coverage Status

Coverage decreased (-0.08%) to 87.077% when pulling e727622 on lambda-type-annotations-continued into 669dd85 on master.

@timtebeek timtebeek requested a review from rasklaad September 27, 2019 19:41
@timtebeek timtebeek marked this pull request as ready for review September 27, 2019 21:08
@mpkorstanje mpkorstanje changed the base branch from master to lambda-type-annotations September 28, 2019 21:07
@mpkorstanje mpkorstanje merged commit 5dd201f into lambda-type-annotations Sep 28, 2019
@mpkorstanje mpkorstanje deleted the lambda-type-annotations-continued branch September 28, 2019 21:07
@mpkorstanje
Copy link
Contributor

Cheers merged it into the other one. This was pretty clean!

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.

6 participants