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

Fix incompatibility with JAnsi < 2.1.0 #48

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

Vankka
Copy link
Contributor

@Vankka Vankka commented Jun 22, 2024

This PR fixes JAnsiColorLevel reporting as available on < 2.1.0 where AnsiColors does not exist and AnsiConsole#out has a different signature 2.1.0 2.0.1

Error thrown when calling JAnsiColorLevel#compute on JAnsi < 2.1.0

java.lang.NoSuchMethodError: 'org.fusesource.jansi.AnsiPrintStream org.fusesource.jansi.AnsiConsole.out()'
        at net.kyori.ansi.JAnsiColorLevel.computeFromJAnsi(JAnsiColorLevel.java:50) ~[?:?]
        at net.kyori.ansi.ColorLevel.compute(ColorLevel.java:207) ~[?:?]
        at net.kyori.adventure.text.serializer.ansi.ANSIComponentSerializerImpl$BuilderImpl.<init>(ANSIComponentSerializerImpl.java:151) ~[?:?]
        at net.kyori.adventure.text.serializer.ansi.ANSIComponentSerializer.builder(ANSIComponentSerializer.java:63) ~[?:?]

@Vankka Vankka changed the title Fix incompatibility with JAnsi 1.x Fix incompatibility with JAnsi < 2.1.0 Jun 22, 2024
@zml2008 zml2008 self-assigned this Jun 22, 2024
@zml2008
Copy link
Member

zml2008 commented Jun 22, 2024

JAnsi 2.1.0 was released just about 4 years ago, but sure i guess

@zml2008 zml2008 added this to the 1.1.0 milestone Jun 22, 2024
@zml2008 zml2008 added this pull request to the merge queue Jun 22, 2024
Merged via the queue into KyoriPowered:trunk with commit a8ab315 Jun 22, 2024
3 checks passed
@zml2008 zml2008 added the bug Something isn't working label Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants