8000 Don't use Zinc analysis file to find main classes by lefou · Pull Request #4819 · com-lihaoyi/mill · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Don't use Zinc analysis file to find main classes #4819

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

Closed

Conversation

lefou
Copy link
Member
@lefou lefou commented Mar 30, 2025

No description provided.

lefou and others added 3 commits March 30, 2025 21:08
This needs to be requested explicitly,
since the default package can't be "found" by design,
as it has no name and can't be imported.

Added tests.
val mainClasses = for {
foundPackage <- recursive("", (p: String) => path.packages(p).map(_.name))
foundPackage <- defaultPackage +: recursive("", (p: String) => path.packages(p).map(_.name))
Copy link
Member

Choose a reason for hiding this comment

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

This whole def recursive thing that was copy-pasted from elsewhere can probably be replaced by the following snippet from the other PR

      def recursivePackages(p: String) = Seq(p) ++ path.packages(p).map(_.name)

      val mainClasses = for {
        foundPackage <- recursivePackages("")

Copy link
Member Author

Choose a reason for hiding this comment

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

Got it. I just wanted to see all test green before I change that "working" part of the code.

@lefou
Copy link
Member Author
lefou commented Mar 31, 2025

@lefou lefou closed this Mar 31, 2025
@lefou lefou deleted the tr-find-mainclasses-with-scalap-only branch March 31, 2025 10:56
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.

2 participants
0