-
Notifications
You must be signed in to change notification settings - Fork 143
Add class script wrapper #2033
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
Add class script wrapper #2033
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Looks like some tests might need fixing up? |
87fd0c7
to
d1f61ca
Compare
tgodzik
reviewed
Apr 17, 2023
modules/build/src/main/scala/scala/build/internal/ClassCodeWrapper.scala
Show resolved
Hide resolved
MaciejG604
commented
Apr 18, 2023
modules/cli/src/main/scala/scala/cli/commands/shared/SharedOptions.scala
Outdated
Show resolved
Hide resolved
Gedochao
reviewed
Apr 18, 2023
modules/build/src/main/scala/scala/build/internal/ClassCodeWrapper.scala
Show resolved
Hide resolved
modules/build/src/main/scala/scala/build/internal/ClassCodeWrapper.scala
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/shared/SharedOptions.scala
Outdated
Show resolved
Hide resolved
modules/build/src/main/scala/scala/build/internal/ClassCodeWrapper.scala
Outdated
Show resolved
Hide resolved
modules/build/src/main/scala/scala/build/internal/ClassCodeWrapper.scala
Outdated
Show resolved
Hide resolved
a8a0a61
to
5a8c525
Compare
a69b040
to
fcc8b3f
Compare
67c4923
to
f70d88e
Compare
f70d88e
to
7ecc0ef
Compare
lwronski
approved these changes
May 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d9caa73
to
67cedb2
Compare
Gedochao
approved these changes
May 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, commented on some nitpicks
modules/build/src/main/scala/scala/build/internal/util/WarningMessages.scala
Outdated
Show resolved
Hide resolved
67cedb2
to
caf27c1
Compare
caf27c1
to
18707eb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should avoid deadlocks when threads are run from the static initalizer of wrapper object.
Closes #532 and #1933
The key to this issue is what's visible in the thread dump from this comment
The background thread worker is waiting for object class to be initialized, but the object class initialization process is waiting for the background thread to finish, this introduces a deadlock.
As stated by David Crosson in #532 encapsulating the
wait/join/Await.ready
method into a additonal object fixed this in some cases by making the background thread not dependent on the initialization of the outer wrapper object introduced by Scala CLI.