-
-
Notifications
You must be signed in to change notification settings - Fork 358
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 init
command and support running Mill without existing build.sc
#2662
Conversation
build.sc
init
command and support running Mill without existing build.sc
@lihaoyi Before continuing it would be nice to have your feedback on this issue. Beside initialization of new projects an maybe the We could make it an built-in option though. We already have |
Yeah this goes back to the "how do evaluator commands work" discussion. I'd be fine with either magic whitelisting the |
I first added an integration test for the init command to reproduce the issues and make sure the feature now works. Instead of failing in case there is no `build.sc`, we continue with an empty setup. Only when we discover an error afterwards, we add a message about the missing `build.sc` to the underlying error message.
I added a whitelist of tasks, so we only continue without a |
I first added an integration test for the init command to reproduce the issues and make sure the feature now works.
Instead of failing in case there is no
build.sc
, we now check the targets against a whitelist of tasks (init
andversion
) and continue with an empty setup.We also accept a missing
build.sc
in case additional imports are given, which could mean, the imports contain Mill plugins which itself provide commands that could work without abuild.sc
.Only when we discover an error afterwards, we add a message about the missing
build.sc
to the underlying error message. That means, we don't see the spurious "no build.sc" message when everything works as expected.