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

Improve reporting in staging about the possible use of an incorrect class loader #20137

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Apr 9, 2024

(Hopefully) closes #19170 and #19176 and extends the changes from #19428

I do not really think it's possible to comprehensively check whether the class loader that is being passed into the staging.compiler is the correct one or not, so instead I tried improving the reporting here (like in the previous PR above) coming from the compiler, so that:

@nicolasstucki what do you think about this? I don't really know what else we can do for those 2 issues

@jchyb jchyb force-pushed the fix-staging-classloader-reporting branch from 2d5c41c to 01e09c0 Compare April 9, 2024 13:27
@jchyb
Copy link
Contributor Author

jchyb commented Apr 9, 2024

Looking at the test failures, I definitely need to change this
ok, ended up finding a simple fix for those

@jchyb jchyb force-pushed the fix-staging-classloader-reporting branch from 01e09c0 to 59b0c07 Compare April 9, 2024 16:27
@jchyb jchyb force-pushed the fix-staging-classloader-reporting branch from 59b0c07 to 7b8d825 Compare April 22, 2024 14:58
@jchyb jchyb marked this pull request as ready for review April 22, 2024 14:59
@jchyb jchyb force-pushed the fix-staging-classloader-reporting branch from 7b8d825 to 7e84497 Compare April 22, 2024 14:59
* do not println staging crashes to stdout
* enrich the errors coming from the compiler with additional
hints about using the correct classloader
@jchyb jchyb force-pushed the fix-staging-classloader-reporting branch from 7e84497 to b9c7cad Compare April 22, 2024 15:00
@jchyb jchyb requested a review from nicolasstucki April 23, 2024 10:18
@jchyb jchyb merged commit 1fc3916 into scala:main Apr 24, 2024
19 checks passed
@jchyb jchyb deleted the fix-staging-classloader-reporting branch April 24, 2024 09:24
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
WojciechMazur added a commit that referenced this pull request Jul 6, 2024
…ncorrect class loader" to LTS (#21080)

Backports #20137 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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.

Runtime staging compiler crash when creating an object using "new" (scala 3.3.1)
3 participants