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

Report the loss of trait init methods #448

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

dwijnand
Copy link
Collaborator

In the encoding of traits the presence of a method with a body (a
"concrete method") triggers the generation of a trait initialisation
method, "$init$", which will be invoked by subclasses during
construction. The effect this has is that dropping the last concrete
method(s) from a trait removes the trait init method, which is a
binary incompatible change to client's subclasses.

Fixes #426

@dwijnand dwijnand force-pushed the report-trait-init branch 3 times, most recently from c6ad3a3 to 432d17f Compare January 13, 2020 13:55
In the encoding of traits the presence of a method with a body (a
"concrete method") triggers the generation of a trait initialisation
method, "$init$", which will be invoked by subclasses during
construction.  The effect this has is that dropping the last concrete
method(s) from a trait _removes_ the trait init method, which is a
binary incompatible change to client's subclasses.

Fixes lightbend-labs#426
@mergify mergify bot merged commit 04ed855 into lightbend-labs:master Jan 14, 2020
@lrytz
Copy link
Contributor

lrytz commented Jan 14, 2020

Uh, I had no idea this would merge the PR 😄

@dwijnand dwijnand deleted the report-trait-init branch January 14, 2020 13:13
@dwijnand
Copy link
Collaborator Author

Working as intended! 😄

@travisbrown
Copy link

Thanks much! Any chance of a new release soon?

@dwijnand
Copy link
Collaborator Author

Hehe. Yep, just want to try to land #444 first. I might fast track that by exempting differences in Scala 2.11. I'll try this week or next.

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

Successfully merging this pull request may close these issues.

False negatives for methods moving up in trait hierarchy
3 participants