Include private members in API hash of traits.#2160
Merged
Conversation
During compilation, scalac generates getters and setters for the fields of traits, regardless of their access modifiers. Therefore, when a field of a trait is modified, all its implementors must be recompiled to take these changes into account. Private fields of traits were not included in the API hash of traits, and their implementors were thus not recompiled when modified. This commit changes the way the API hash is computed for traits only, so that the generated hash includes the private members of traits. Fixes sbt#2155
Contributor
Author
There was a problem hiding this comment.
Does that count as a breakage of the binary compatibility?
Member
There was a problem hiding this comment.
Let's try the overload, and deprecate the old one.
|
Can one of the admins verify this patch? |
Member
|
LGTM |
eed3si9n
added a commit
that referenced
this pull request
Aug 17, 2015
Include private members in API hash of traits.
Member
|
Nice! |
Member
|
⭐ |
Duhemm
added a commit
to Duhemm/sbt
that referenced
this pull request
Aug 18, 2015
It appears to have been fixed by sbt#2160
This was referenced Aug 26, 2015
eed3si9n
added a commit
to sbt/zinc
that referenced
this pull request
Sep 8, 2015
Include private members in API hash of traits. (sbt/sbt#2160)
adriaanm
added a commit
to adriaanm/sbt
that referenced
this pull request
Dec 20, 2015
adriaanm
added a commit
to adriaanm/sbt
that referenced
this pull request
Dec 21, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During compilation, scalac generates getters and setters for the fields
of traits, regardless of their access modifiers. Therefore, when a
field of a trait is modified, all its implementors must be recompiled to
take these changes into account.
Private fields of traits were not included in the API hash of traits,
and their implementors were thus not recompiled when modified.
This commit changes the way the API hash is computed for traits only, so
that the generated hash includes the private members of traits.
Fixes #2155