-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
Allow users to pass a custom output dir on the command-line #3530
base: main
Are you sure you want to change the base?
Conversation
Fixes #3144 |
How about we use an env var rather than a flag? That way we dont get to parse it and can keep the server files in the same place (relatively) as they are today. I'd rather not split them into a separate folder if it can be avoided |
env var isnt perfect either from a UX perspective, but given this is a bit of a niche case I think its a better solution than reorganizing the file layout for this feature due to implementation concerns. lets go with an envvar for now and at some point we may have a graal native or scalanative client and can have it be smart enough to use flags |
As for the cli args, if at all, I'd suggest to just go with Here are some more motivations for alternative out dirs:
As a consequence, I think we should be able to split the two uses of |
Let's go with the env var for now and keep the I do agree that generating an |
cd73580
to
50a6219
Compare
50a6219
to
554a649
Compare
First cut at #3144, for early feedback just in case.
Seems the
out
directory is used for two purposes:A simple CLI option can be used for the former, which this PR adds (
-o
/--output
).For the latter, as it's used early when Mill starts (mainly in
MillClientMain
), CLI options aren't parsed yet.We could parse the first options a bit more from
MillClientMain
to read-o
/--output
. For now, as a workaround, I changed the directory used for the latter case, to.mill
, but I don't know if that's a direction you're ready to go to right now. I think it makes sense if users are to use a network directory via-o
/--output
: server-related files are specific to the current machine, and are not meant to be shared, it seems.I'll add tests if the current choices look fine.