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

Tapestry 5.7 support #1312

Closed
vjlamp opened this issue Apr 21, 2021 · 8 comments
Closed

Tapestry 5.7 support #1312

vjlamp opened this issue Apr 21, 2021 · 8 comments

Comments

@vjlamp
Copy link

vjlamp commented Apr 21, 2021

What

The spock-tapestry should be upgraded to support Tapestry 5.7, so that users upgrading to Tapestry 5.7 can continue to use existing spock-tapestry based specifications.

Why

Tapestry 5.7 is not fully backwards-compatible with previous releases. Many classes were moved to other packages, and sometimes even to a different JAR. This was done to avoid split packages, making them easier to be used with Java 9+ modules. See the Tapestry 5.7 release notes for details.

Running an @ImportModule annotated specification causes a java.lang.ClassNotFoundException concerning org.apache.tapestry5.ioc.AnnotationProvider, as its new home is now in the org.apache.tapestry5.commons package, for example.

How

Getting the task done requires two steps.

  1. Upgrade the Tapestry dependency
  2. Updates sources to resolve breaking changes. This can easily get done with the migration tool provided.

I've already successfully applied the above steps in my Spock fork. All tests run successfully. Adding new tests doesn't appear necessary as the Tapestry functionality hasn't changed.

Happy to issue a pull request if the project board agrees this would be a useful contribution to spock-tapestry.

@leonard84
Copy link
Member

I've already opened an issue https://issues.apache.org/jira/browse/TAP5-2668 to move the spock support to tapestry-test.

@vjlamp
Copy link
Author

vjlamp commented Apr 21, 2021

Had not been aware of TAP5-2668 - thank you for pointing it out. While it's not hard to upgrade Spock's Tapestry dependency to version 5.7.+ you have a point about having to support different Tapestry versions. If the Tapestry maintainers agree to have the code moved from spock-tapestry to tapestry-spock I'm happy to help get the work done. Ultimately, I would like to continue using my Spock specs in Tapestry 5.7 and later.

@szpak
Copy link
Member

szpak commented Apr 23, 2021

Maybe we should deprecated the Tapestry module in Spock 2.0 - to indicate that in the long run (possibly also during 2.x) it might be removed (if for example it was transferred to the Tapestry project)?

@thiagohp
Copy link

Copying here the comment I posted to TAP5-2668:

Hello, Leonard Brünings and Volker Lamp!

Since the Tapestry team is small and there's no one working on it full time, we usually avoid bringing projects to inside the project so we don't have yet more code to maintain (and, speaking for myself, I have no experience with Spock at all).

In this specific case, there was a very rare major refactor that moved a number of classes from one package to another so Tapestry code doesn't have split packages, which are a headache for projects using Java 9+ modules. Otherwise, the Tapestry's public API has changed very little since 5.4.

Another similar refactor isn't expected to happen again ever, so I believe the best course of action here is for us or Volker Lamp provide a pull request for getting tapestry-spock working with Tapestry 5.7.0+ so the next tapestry-spock version supports it. Current and previous tapestry-spock versions cover previous versions of Tapestry.

@leonard84
Copy link
Member

@vjlamp would you be willing to adopt spock-tapestry, I basically have the same problem as Thiago just the other way around. I don't have any experience in tapestry at all.

@vjlamp
Copy link
Author

vjlamp commented Apr 26, 2021

Thank you, @leonard84. I'm a big fan of both Spock and Tapestry. Great to be able to continue using both without own hacks. Any question or improvements to be made in my pull request, just let me know.

@Vampire
Copy link
Member

Vampire commented Jun 1, 2021

This can then also be closed @vjlamp, right?

@leonard84
Copy link
Member

Spock support was added to tapestry itself. See Third-Party-Extensions tapestry-spock

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

No branches or pull requests

5 participants