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

DiscordSRV includes ancient jetbrains annotations in jar #1627

Open
1 of 3 tasks
rymiel opened this issue Jan 15, 2024 · 2 comments · May be fixed by #1629
Open
1 of 3 tasks

DiscordSRV includes ancient jetbrains annotations in jar #1627

rymiel opened this issue Jan 15, 2024 · 2 comments · May be fixed by #1629

Comments

@rymiel
Copy link

rymiel commented Jan 15, 2024

Expected behavior

I can depend on DiscordSRV as a gradle dependency and use a modern version of jetbrains annotations that supports TYPE_USE annotations.

Actual behavior

Since 1.26.1, jetbrains annotations in getting included in the released jar, but it's a newer version, so it's fine.
Since 1.27.0, an ancient Java 5 version is included, which lacks TYPE_USE. This breaks usages like this:

public void f(byte @NotNull [] message) {}

This snippet won't compile if DiscordSRV is included as a dependency in my gradle project.

Steps to reproduce

Open up the jar file of 1.27.0 and note the existence of the org/jetbrains/annotations folders. Use javap on any class (like "NotNull.class") and note that the major version is 49, corresponding to java 5. Also note the lack of TYPE_USE in the bytecode.

Server software and version

not relevant

Checks

  • I am not using an outdated version of DiscordSRV.
  • I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.
  • I didn't actually check any of these things

Anything else

There is no reason to include annotations in the release jar, they don't do anything after compilation.
Also, your issue tracker is not built for handling build or dependency errors.

@rymiel rymiel added the bug label Jan 15, 2024
@BlueTree242
Copy link
Contributor

Yup, can confirm

@granny granny linked a pull request Apr 14, 2024 that will close this issue
@granny granny added the fixed label Apr 14, 2024
@granny
Copy link
Member

granny commented May 13, 2024

forgot to leave a comment; this should be fixed in the latest snapshot builds. Issue will be automatically closed once a release build is published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants