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

Fixes #1230. Add test to make sure Asciidoctor version is returned wh… #1243

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

robertpanzer
Copy link
Member

…en using --version

Thank you for opening a pull request and contributing to AsciidoctorJ!

Please take a bit of time giving some details about your pull request:

Kind of change

  • Bug fix
  • New non-breaking feature
  • New breaking feature
  • Documentation update
  • Build improvement

Description

What is the goal of this pull request?

This PR fixes #1230.
#1230 mentioned that we have a fallback when returning the version of the packaged Asciidoctor version.
This PR removes that fallback and would fail hard with a NullPointerException if the generated file containing the version numbers is not available.
Additionally a test makes sure that the generated file is available.

How does it achieve that?

Remove the fallback, and enhance the tests.

Are there any alternative ways to implement this?

We could search the class path for the asciidoctor gemspec and parse that, or maybe call some API exposed by JRuby to query the gems (or a Ruby-native API).

Are there any implications of this pull request? Anything a user must know?

No, everything should work as before.

Issue

If this PR fixes an open issue, please add a line of the form:

Fixes #1230

Release notes

Please add a corresponding entry to the file CHANGELOG.adoc

@robertpanzer
Copy link
Member Author

The upstream build obviously won't work with that.
I'll try to figure out a way to adapt the test accordingly.
Maybe I can make the version available to the test via a system property.

@robertpanzer robertpanzer merged commit 571fa7f into asciidoctor:main Nov 20, 2023
11 checks passed
@robertpanzer robertpanzer deleted the fix-1230-version-info branch November 20, 2023 16:52
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.

Ensure AsciidoctorJ version is returned always in CLI
2 participants