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

Ignore StaleSymbol exceptions when testing whether dependencies shoul… #13594

Merged
merged 3 commits into from Sep 27, 2021

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Sep 23, 2021

…d be ignored

Fixes #13532

A question is whether the catch should be in ignoreDependency in the SBT dependency
extractor or in isAbsent itself. I put it in ignoreDependency for now in order
not to hide possible stale symbol errors since isAbsent is called quite often.

…d be ignored

Fixes scala#13532

A question is whether the catch should be in `ignoreDependency` in the SBT dependency
extractor or in `isAbsent` itself. I put it in `ignoreDependency` for now in order
not to hide possible stale symbol errors since isAbsent is called quite often.
@smarter
Copy link
Member

smarter commented Sep 23, 2021

Catching in ignoreDependency seems safer indeed, but I don't have a good grasp on how suspended compilation works: why do we get a stale symbol at all here?

@odersky
Copy link
Contributor Author

odersky commented Sep 24, 2021

The stale symbol errors involve constructor proxies. I believe it's because we are generating them later on demand that the normal symbol update mechanisms don't always work. I am not sure about the precise details and don't have time to dig into it more. In the case of suspended computation it looks like it's the two phases that systematically follow all symbol links in usages that hit the stale symbol error. I verified that a program that calls a constructor proxy directly, but uses neither extract option, compiles correctly.

@bishabosha Can you check that the updated semanticdb expect files are reasonable?

@odersky odersky assigned bishabosha and unassigned odersky Sep 24, 2021
@bishabosha bishabosha assigned odersky and unassigned bishabosha Sep 27, 2021
Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

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

semanticdb changes LGTM

@odersky odersky merged commit abcc58b into scala:master Sep 27, 2021
@odersky odersky deleted the fix-13532 branch September 27, 2021 12:39
@Kordyjan Kordyjan added this to the 3.1.1 milestone Aug 2, 2023
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.

StaleSymbol error caused by macro and import
4 participants