Skip to content

Fix #8427: Disallow SerialVersionUID on a trait #8429

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

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

smarter
Copy link
Member

@smarter smarter commented Mar 3, 2020

No description provided.

@ohze
Copy link

ohze commented Mar 3, 2020

I don't know if it's really not meaningful.
For example, in latest akka's source has 14 traits annotated with @SerialVersionUID like this and also annotated with @silent("@SerialVersionUID has no effect")

@smarter
Copy link
Member Author

smarter commented Mar 3, 2020

It's not meaningful since it literally doesn't do anything (the bytecode is identical). I don't understand why akka would put it there and silence the warning instead of removing the annotation.

@smarter smarter force-pushed the serialvuid-trait branch from f14eec9 to cd5bf83 Compare March 3, 2020 19:13
@smarter smarter merged commit df0bb24 into scala:master Mar 3, 2020
@smarter smarter deleted the serialvuid-trait branch March 3, 2020 19:59
@SethTisue
Copy link
Member

cc @patriknw

@patriknw
Copy link

patriknw commented Mar 4, 2020

Could be for historical reasons. Maybe it was mixed in differently in Scala 2.10 or 2.11, or we simply misunderstood if it was of importance to have the annotation on the traits or not and sprinkled it in more places than need.

giabao added a commit to ohze/akka that referenced this pull request Mar 21, 2020
giabao added a commit to ohze/akka that referenced this pull request Mar 27, 2020
giabao added a commit to ohze/akka that referenced this pull request Mar 28, 2020
giabao added a commit to ohze/akka that referenced this pull request Mar 28, 2020
giabao added a commit to ohze/akka that referenced this pull request Mar 28, 2020
giabao added a commit to ohze/akka that referenced this pull request Mar 28, 2020
giabao added a commit to ohze/akka that referenced this pull request Mar 30, 2020
giabao added a commit to ohze/akka that referenced this pull request Mar 31, 2020
giabao added a commit to ohze/akka that referenced this pull request Mar 31, 2020
giabao added a commit to ohze/akka that referenced this pull request Apr 2, 2020
giabao added a commit to ohze/akka that referenced this pull request Apr 5, 2020
giabao added a commit to ohze/akka that referenced this pull request Apr 6, 2020
giabao added a commit to ohze/akka that referenced this pull request Apr 7, 2020
giabao added a commit to ohze/akka that referenced this pull request Apr 8, 2020
giabao added a commit to ohze/akka that referenced this pull request Apr 9, 2020
giabao added a commit to ohze/akka that referenced this pull request Apr 20, 2020
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.

5 participants