Join GitHub today
Fix #102: Better main class detection #287
Previously, the main class detection was handled by
This commit partially fixes this by adding a new callback to AnalysisCallback:
void mainClass(File sourceFile, String className)
that is used to explicitly register main entry points. This way, tools
This commit does not actually changes ExtractAPI to not dealias, this
Note that there is another usecase for xsbt.api.Discovery that this PR
Note also that the added scripted test does not actually test that this
Apr 6, 2017
referenced this pull request
Apr 6, 2017
I fixed the added test to:
jvican left a comment
LGTM. Excellent job!
It's true that we need to put the hooks (or provide the necessary information) to detect main classes for tests. I'll look into the best way to do so.
eed3si9n left a comment
Is it possible to fix the root cause rather than adding special case for main class detection?
The root cause is the use of Discovery, the fix is to not use Discovery and the same should be done for tests, and Discovery should be removed. There is no way to make Discovery understand all the semantics of Scala type system.