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

MultiCauseIOException fails on errorprone #127

Closed
mosesn opened this issue May 14, 2023 · 4 comments
Closed

MultiCauseIOException fails on errorprone #127

mosesn opened this issue May 14, 2023 · 4 comments

Comments

@mosesn
Copy link
Contributor

mosesn commented May 14, 2023

On master

[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] /Users/moses/projects/ch.vorburger.exec/src/main/java/ch/vorburger/exec/MultiCauseIOException.java:[41,33] non-transient instance field of a serializable class declared with a non-serializable type
[INFO] 1 warning
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/moses/projects/ch.vorburger.exec/src/main/java/ch/vorburger/exec/MultiCauseIOException.java: warnings found and -Werror specified
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
@vorburger
Copy link
Owner

Huh?! I'm ... very stunned why I'm neither seeing this locally with ./mvnw clean test nor on CI.

The Continous Integration of the master branch is green & passes (note the green tick mark).

See https://github.com/vorburger/ch.vorburger.exec/actions/runs/4974375147/jobs/8900782436.

You seem to know what you are doing, but are you 100% sure you have a pristine local version, without any local changes, with the exact same dependencies from Maven, and not e.g. something "dirty" (different) in your local Maven repo. Because that's the only logical explanation - that I can think of.

Shout if you can think of any other reason why we would have such a discrepancy.

Or could this be related to JDK version? I run OpenJDK 17 locally, and then CI is on Java 11 (even though we are enforcing Java 8 source and target and API). But no, that actually can't be - Error Prone won't even run on Java 8.

I'm honestly at a loss about what be causing this for you!

@mosesn
Copy link
Contributor Author

mosesn commented May 15, 2023

Ah, I think I spotted it. I'm on Java 19 locally. Looks like this was added in Java 18.

https://bugs.openjdk.org/browse/JDK-8274336

@vorburger
Copy link
Owner

Oh! How about we simply entirely disable the Lint category for Serializable in the pom.xml? (I think Serializable is irrelevant nowadays.) If you know how, do you want to raise a PR?

@vorburger
Copy link
Owner

25dd04c just fixed this!

@mosesn heads-up FYI #187 ...

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

No branches or pull requests

2 participants