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

Use Zinc-independent main class discovery everywhere #3436

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

lefou
Copy link
Member

@lefou lefou commented Aug 29, 2024

Instead we use the compilation-task independent discovery of main classes.

Instead we use the compilation-task independent discovery of main classes.
@lefou
Copy link
Member Author

lefou commented Aug 29, 2024

This might also fix the issue described in #3432, since it uses a main-class discovery independent of the used compiler. @AnthonyGrod could you please verify?

@lefou lefou changed the title Don't assume a Zinc compiler in BSP JVM extension Use Zinc-independent main class discovery everywhere Aug 29, 2024
@AnthonyGrod
Copy link
Contributor

@lefou I've also tried this approach earlier but it does not work unfortunately. Discovering the main test class (which zincWorker fails to do - the main test class is always mill.testrunner.entrypoint.TestRunnerMain and I think the actual testing suite that needs to be run is somehow resolved with main test class arguments) itself is not the biggest issue - it's discovering main test class arguments and it's corresponding classpath for the local Java application launching. I don't think it's possible to resolve all of it without the TestModule logic.

@lefou
Copy link
Member Author

lefou commented Aug 29, 2024

I see. I think the BSP spec is misleading here, as we aren't interested in any local main class but in the test runner itself. And the actual test runner isn't in the local classpath (compiler output) but the provided dependencies. Although the spec mentions, that this endpoint is also supposed to launch a custom main class.

@lefou lefou marked this pull request as draft August 29, 2024 19:13
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