-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
WIP Convert CLI argument parsing to use latest version of ammonite+mainargs #1008
Conversation
…+mainargs. Things compile, haven't tested
Looks good to me. I haven't used the new About the Github Actions setup: I already have PR #993 open using a test matrix and also working for scala native tests, which waits for your input regarding the publishing step. |
Yeah I expect to merge this into master and try it out for a bit before cutting a stable release. The mainargs code is pretty raw - took some surgery to extract it from ammonite, and then some re-organization to pretty it up and make it re-usable - but hopefully it's 99% there and we can manually suss out the last 1% before cutting a stable release of Mill + Ammonite Sorry I didn't notice #993; I kind of hacked together the github actions config here from first principles. I'll probably merge this as is once i get things working, but feel free to replace it after if you think it could be done better somehow! |
@lihaoyi , looks like you have disabled Travis-CI for the whole mill repository. Can you split up this PR in case you want to stabilize the |
Ah yeah sorry about that, I'll turn back on travis once I'm back at my
computer. No need to block other PRs on this one
…On Tue, 24 Nov 2020 at 6:27 PM, Tobias Roeser ***@***.***> wrote:
@lihaoyi <https://github.com/lihaoyi> , looks like you have disabled
Travis-CI for the whole mill repository. Can you split up this PR in case
you want to stabilize the mainargs migration longer, so that we can merge
the Github Actions part before? We currently have other PRs awaiting merges
which no longer get CI builds.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1008 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE5HBDFWOTLB2T7PZQAFGNDSRODAZANCNFSM4T66SYMA>
.
|
@lefou I've turned travis back on |
All tests pass, merging this. Hopefully the post-merge logic passes too... |
This replaces the copy-paste logic handling both Mill's own CLI argument parsing as well as the CLI argument parsing of user-defined
T.command
s to instead rely on the https://github.com/lihaoyi/mainargs implementation. This is similar to the earlier PR that performed such a migration in the lihaoyi/Ammonite repo com-lihaoyi/Ammonite#1126Where the semantics of Mill's own CLI parsing and
T.command
CLI parsing differ, we pass in the corresponding flags to handle the difference, e.g.allowPositional = false
for Mill's own parameters andallowPositional = false
forT.command
s.Since the MainArgs library is standalone, we also cut the dependency on Scopt since it is now unnecessary. Our existing
scopt.Reads
are all replaced bymainargs.TokensReader
Things compile, haven't tested