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

Propagate main class in sbt plugin #740

Merged
merged 3 commits into from
Nov 29, 2018
Merged

Conversation

tindzk
Copy link
Contributor

@tindzk tindzk commented Nov 25, 2018

Closes #718.

@jvican jvican changed the title sbt plug-in: Detect main class Propagate main class in sbt plugin Nov 27, 2018
@jvican jvican added enhancement task / run community Any change or proposal that is contributed by the Open Source Community. labels Nov 27, 2018
@jvican
Copy link
Contributor

jvican commented Nov 27, 2018

@tindzk It looks like this change is making the CI hang on Windows, so I had to kill the process manually.

Scala.js link for a test module would fail in the presence of a main
class in the configuration file of the test project, because it would
force the link infrastructure to set up main module initializers instead
of test module initializers.
@jvican jvican force-pushed the issue/718 branch 3 times, most recently from f5ffb6f to 35791e3 Compare November 29, 2018 13:24
In sbt, we cannot reuse `mainClass` because it triggers compilation when
the user has not specified it in its build.sbt. From the outside, there
is no way for us to know if the user declared it or not, and therefore
we plainly cannot trigger the execution of `mainClass`.

To allow users to specify the main class though, we introduce a
`bloopMainClass`, a duplicate of `mainClass` which doesn't trigger
compilation, so that users that don't want to verbosely pass in the main
class every time their application can set it in their build.sbt file.
Copy link
Contributor

@jvican jvican left a comment

Choose a reason for hiding this comment

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

I added a bunch of fixes to make this addition work. Thanks for getting the ball rolling @tindzk

@jvican jvican merged commit 28066c0 into scalacenter:master Nov 29, 2018
@tindzk tindzk deleted the issue/718 branch November 30, 2018 08:27
@tindzk
Copy link
Contributor Author

tindzk commented Nov 30, 2018

Thanks for the fixes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Any change or proposal that is contributed by the Open Source Community. enhancement task / run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants