Skip to content

Re-architecture staging phase and fix all known issues of that phase #8796

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 2 commits into from
May 5, 2020

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Apr 25, 2020

Fix #6140, fix #6772, fix #7030, fix #7892, fix #7997, fix #8651 and improve #8100.

Differences with previous implementation

  • Only track and check levels within quotes or splices
  • Track levels of all symbols not at level 0
  • Split level checking into specialized variants for types and terms (healType/healTermType)
  • Detect inconsistent types rather than try to detect consistent ones
  • Check/heal term inconsistencies only on leaf nodes (TypeTree, RefTree, Ident, This)

@nicolasstucki nicolasstucki changed the title WIP Re-implement staging WIP Re-implement staging phase Apr 25, 2020
@nicolasstucki nicolasstucki force-pushed the reimplement-staging-phase branch from 2acb6f7 to c6f67f1 Compare April 26, 2020 05:30
@nicolasstucki nicolasstucki changed the title WIP Re-implement staging phase WIP Re-architecture staging phase Apr 26, 2020
@nicolasstucki nicolasstucki force-pushed the reimplement-staging-phase branch 8 times, most recently from 2d09b0d to c8306d0 Compare April 28, 2020 15:57
@nicolasstucki nicolasstucki self-assigned this Apr 29, 2020
@nicolasstucki nicolasstucki changed the title WIP Re-architecture staging phase Re-architecture staging phase Apr 29, 2020
@nicolasstucki nicolasstucki force-pushed the reimplement-staging-phase branch 2 times, most recently from 8337eb0 to 3df9139 Compare April 29, 2020 09:31
@nicolasstucki nicolasstucki marked this pull request as ready for review April 29, 2020 10:54
@nicolasstucki nicolasstucki requested a review from odersky April 29, 2020 10:55
@nicolasstucki
Copy link
Contributor Author

@odersky this PR is ready for review. The CLA failed to finish.

@nicolasstucki
Copy link
Contributor Author

In our first implementation, we assumed that handling levels of type and terms would be quite similar. We said that types and term can only be used at the same level ... with some exceptions for types that can be healed or are used at a lower level in a macro.

Since then we have realized that in general types can be used at any level, but if used in a larger level they must be healed. In the previous implementation tried to patch this in different places. Instead, this one handles types and terms as two different entities that need to be handled in their own way.

@nicolasstucki nicolasstucki changed the title Re-architecture staging phase Re-architecture staging phase and fix all known issues of that phase May 1, 2020
Fix scala#6140, fix scala#6772, fix scala#7030, fix scala#7892, fix scala#7997, fix scala#8651 and improve scala#8100.

Differences with previous implementation
* Only track and check levels within quotes or splices
* Track levels of all symbols not at level 0
* Split level checking into specialized variants for types and terms (healType/healTermType)
* Detect inconsistent types rather than try to detect consistent ones
* Check/heal term inconsistencies only on leaf nodes (TypeTree, RefTree, Ident, This)
@nicolasstucki nicolasstucki force-pushed the reimplement-staging-phase branch from 3df9139 to c03cb65 Compare May 4, 2020 08:06
@nicolasstucki
Copy link
Contributor Author

Rebased

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the code. Just some typos to fix.

@nicolasstucki nicolasstucki merged commit 9158886 into scala:master May 5, 2020
@nicolasstucki nicolasstucki deleted the reimplement-staging-phase branch May 5, 2020 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment