Skip to content

Refine dependency extraction: Ignore packages #4326

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 5 commits into from
Apr 19, 2018

Conversation

allanrenucci
Copy link
Contributor

We can ignore packages when collecting dependencies for incremental
compilation. We make sure not to ignore dependencies on package object.

@allanrenucci
Copy link
Contributor Author

allanrenucci commented Apr 16, 2018

Zinc only ignores packages for class dependencies but not for used names. This PR also ignores packages for used names. Not sure it is safe

@allanrenucci
Copy link
Contributor Author

@smarter What's your take on this? Should we add used name for packages like Zinc does?

@smarter
Copy link
Member

smarter commented Apr 16, 2018

I guess you need to because of package objects? If you import something from a package, and if the package object changes, then that may affect you

@allanrenucci
Copy link
Contributor Author

I have added a test case that is failing whether or not we add used names for packages. The test also fails in Zinc (see sbt/zinc#530)

We can ignore packages when collecting dependencies for incremental
compilation. We make sure not to ignore dependencies on package object.
addUsedName(fromClass, mangledName(sym), UseScope.Default)
// packages have class symbol. Only record them as used names but bot dependency
Copy link
Member

Choose a reason for hiding this comment

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

typo: bot -> not

@allanrenucci allanrenucci merged commit 4b2497e into scala:master Apr 19, 2018
@allanrenucci allanrenucci deleted the dep-package branch April 19, 2018 19:56
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.

2 participants