-
Notifications
You must be signed in to change notification settings - Fork 172
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
release 3.0.0-alpha.1 is gravely incompatible with earlier releases #1220
Comments
https://github.com/verhas/jamal/blob/master/jamal-asciidoc258/README.md describes the workaround |
Thanks for the feedback! But I must say that this is a major version and it has been part of its goals to finally implement some improvements that break backward compatibility. As with any piece of software, that's bound to happen at some point. We are aware the changes won't be "nice" and that's why an If it's within your grasp I can suggest using a branching strategy to start working on v3.0.0. We are doing it for the maven-plugin. That helps keep things separated, at the cost of some duplication of course. PS: we have prepared special "v25x to v30" documentation to facilitate the migration https://github.com/asciidoctor/asciidoctorj/tree/main/docs/modules/guides/pages. |
Thanks for coming back to me that fast. I appreciate. I understand that significant versions break backward compatibility. I was reading the old comments why this method was void in the first place, and I can tell, IMHO, it is absolutely reasonable to change the API this direction. The direction is okay, the way, however, could be better paved. I suggest creating the new SPI in a way that leaves room for implementing a preprocessor supporting both versions. I would like to create a preprocessor that can work with the 2.X.X and the 3.X.X versions simultaneously, if possible. You could, for example, rename the method for the 3.X.X versions and deprecate or even delete the old one. The implementation can implement both methods. Your approach makes it challenging to create an implementation supporting both versions. It is not impossible because Java is highly versatile in this sense. However, I had to create a new module in my project with the dependencies on the 2.5.10 version and implement a code, which determines which AsciidoctorJ version is calling it. It is a technical bravado, I can write an article about it, and I enjoyed the two hours of writing and debugging this hack. Now it is ready, so Jamal supports 2.X.X and 3.X.X versions simultaneously as of its next release 2.3.0. However, making your fellow developers' life easy is in your best interest. Preprocessor developers want to focus on the functionality of their software and not on compatibility upgrade changes. I know; I am one. Creating different releases and different branches is possible, but it has its cost. It is not your cost, but still something that we can save. |
BTW: the document https://github.com/asciidoctor/asciidoctorj/blob/main/docs/modules/guides/pages/api-migration-guide-v25x-to-v30.adoc is not there. I mean, it is there, listing other documents, which all return 404. |
First, these are MY comments, I am one of the maintainers and I think I can speak for the whole, but the final decision is open to discussion with the rest. In that regard, can you please update your doc to refer to I am glad you could find a solution. But you brought up some fair points:
|
As an observer, I'd like to point out that I find this comment in the referenced doc to be extremely unfriendly and uncalled for:
First, you're referring to an alpha. Everyone understands that an alpha is a proposal. So to say that a decision was made is completely inaccurate. A decision has been proposed at best. And you seem to have written that accusation before you even brought the issue to the attention of the project and provided ample time for a response. It's entirely possible that the consequences of such a proposal weren't even understood at the time. In short, be nice. And I don't find that comment to be nice. We're all trying to create great software and we don't get there by shaming others. That's not how open source works when it works. |
Dear Abel,
That is exactly the point. In my everyday job, I program Java 8, maintain different versions, and administer many things. It is possible, but it is effort; it is cost. I was just hoping that when we are not in a corporate world we can be more flexible. Dear Dan, you are right, and thank you for the comment. I was a bit pissed when I wrote that sentence. I'm sorry, I fixed it.
I suspected that, but I did not find the document in the project about the release strategy. I did not look for it too long, that is true. Alphas are usually not final releases, but APIs are usually fixed when it is not a SNAPSHOT anymore. You have the right to make incompatible changes in major releases. I am on the sideline so whatever I say is a suggestion from the user side of the API.
and you do. |
BTW: the version number is outdated in the README.adoc If you say you would consider it, I would be happy to create a pull request renaming README.adoc to README.adoc.jam with the proper macros that fetch the latest version during the build (or when you edit with the plugin we just discussed) and adding Jamal to the build (well, I am not experienced with Gradle, but I will give it a try). |
Thanks @verhas. I appreciate your candid reply. |
Cool! Sounds like it could be a good fit. |
Started a thread on Zulip to discuss the path forward. |
Preprocessors are required to implement the
org.asciidoctor.extension.Preprocessor
abstract class.From version
2.5.8
version to3.0.0-alpha-1
the method signature ofchanged to
A preprocessor cannot implement both incompatible methods. When I develop the Jamal preprocessor Asciidoctor integration, I either go with the 2.5.8 version and support all those implementations that use that version (e.g., the IntelliJ Asciidoctor plugin as of today, 2023-06-16). My software starts not working when the plugin upgrade uses the new version. Or I opt for the new, unusable version until the new plugin version comes out.
However, when the new version is out, I will have users who did NOT upgrade to the newest version and users who did.
Or I invest a great amount of technical development and create a code that makes serious class loading tricks, decides on the fly during run-time which version is needed, and registers the one which fits. It is doable but hacky, adding an extra reflective call overhead for each render.
How can you fix this? Can you revert this release and have a version that keeps compatibility with the API interface?
Also, it would be nice to see how you decide on such a compatibility-breaking change before it gets into release and makes extension developers' life a nightmare.
The text was updated successfully, but these errors were encountered: