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

Fix cycle detection behavior in Analyzer #3552

merged 3 commits into from Jan 31, 2019


Copy link

commented Jan 30, 2019

No description provided.

@gzm0 gzm0 requested a review from sjrd Jan 30, 2019

@gzm0 gzm0 force-pushed the gzm0:fix-cycles branch from af97083 to 18d5547 Jan 30, 2019

gzm0 added 2 commits Oct 15, 2018
Fix analyzer cycle detection to only report the cycle
This is something I have discovered while writing the async analyzer.

@gzm0 gzm0 force-pushed the gzm0:fix-cycles branch 2 times, most recently from cf652fe to bb4a6b1 Jan 30, 2019


This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2019


Do not provide linked ClassInfos if there is a cycle
The currently provided ClassInfos are broken: The superClass /
interfaces / ancestors accessors may return null.

We could imagine "fixing" this by actually returning a cyclic object
graph. However, we'd have to be very careful to not continue linking
"too far" in this case: As soon as we try a member lookup we risk an
infinite loop.

Therefore, we simply provide the bare class names and fail fast. This
seems to be acceptable for such a bad error condition.

@gzm0 gzm0 force-pushed the gzm0:fix-cycles branch from bb4a6b1 to 35a0757 Jan 31, 2019

sjrd approved these changes Jan 31, 2019

@sjrd sjrd merged commit cbedf77 into scala-js:master Jan 31, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/jenkins/pr-merge This commit looks good

@gzm0 gzm0 deleted the gzm0:fix-cycles branch Jan 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.