-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 executable jars #13263
Merged
Merged
Fix executable jars #13263
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0421117
Add generating jars with Manifest for scalac
BarkingBad f074726
Fix making executable JARs from scala compiler output
BarkingBad f118982
Move finding Main classes to external sbt run
BarkingBad 7044a61
Restore changes for ExtractAPI. Move miniphase to transformers batch.
BarkingBad 418a84c
Fix unapply for arrays after erasure
BarkingBad 50486af
Refactor collecting entry points. Remove them from context and pass t…
BarkingBad 9cde003
Remove spare checks from CollectEntryPoints
BarkingBad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
This is copied from
compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala
I was thinking whether we could extract it for reuse rather than copy-paste, yet I wasn't sure where should I place it, maybe somewhere underdotty.tools.dotc.util
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.
Please feel free to extract any code for reuse yes, doesn't matter too much where it ends up :). However, having to fully traverse every single compilation unit just to get main method names out is going to be fairly expensive and should be avoided, especially for information that we should already know. Maybe ExtractAPI (or some other phase which is always run if we want this to work even outside of sbt) should collect this information and store it in the Context. In fact, we used to have a phase which was supposed to do that but I deleted it because it was dead code: 3ebf919
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.
Thanks for the advice, I will look into that :D