-
Notifications
You must be signed in to change notification settings - Fork 588
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
Trying to make sense of fake-cli syntax #2666
Comments
Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project! |
Yes the UX is not optimal and it is entirely my fault (I couldn't come up with something better). Rather than going full out technical let me try to motivate why it was implemented this way (we can decide to change that here and start a discussion).
Basically since v5 we have two separate parts of fake, the runtime and the Build-APIs, the runtime is a general purpose F# running and dependency resolving machine (kind of like standalone fsi if you will). Therefore it made sense to split up the command line into a "runtime" and a "targets" part - in order to not inherit 'api'-specific stuff into the 'runtime'-cli. The rest is due to the technical implementation and leaky abstraction :) Regarding
Like said above
Well the Script arguments are what is put in
Does this help? I'm now stepping aside and I'm more than happy to see improvements :) |
Thank you for this thorough reply! |
After digging more, it's kinda funny that I find the --help misleading while the command line is actually generated from it! Docopt seems like the ultimate command line parser at first, but the more I play with it, the less I'm a fan of it.
I suspect one of the reasons I find the fake-cli hard to grok is that I find its parsing unintuitive. I haven't given up just yet, and I don't want to seem disrespectful or anything about your hard work, but I feel like maybe it would be better to reimplement the fake-cli using https://github.com/dotnet/command-line-api ... Another thing: BTW, |
Is there anything left in this issue now after merging #2667 PR? |
I think most of the issues are still present, though hopefully better documented, but I understand if you want to close this issue as there is nothing easily actionable. As I mentioned in my previous comment, I feel like the whole CLI would benefit from being rewritten using https://github.com/dotnet/command-line-api I actually started experimenting with this a few months ago, but I stopped for lack of feedback, and also because I'm still not sure this is the right thing to do. Backward compatibility is important too. ( I might get back to it at some point, we'll see... :) ) |
I think the current version is acceptable and convey the underlying functionality. Until we get to the runner and modify it we can consider changing the help message. Please feel free to experiment with it and PR your results at any time. |
Hello,
I'm new to FAKE, and I'm having a hard time trying to make sense of the FAKE CLI.
After actually spending a few hours on this, I decided to open an issue here so maybe this can be improved. (And I can get answers :))
I don't find the
--help
very helpful on its own, maybe even convoluted to the point of being misleading, and https://fake.build/fake-commandline.html does not really answer my questions.Here are a few things I would really appreciate to be explained better:
The help web page states that
run
andbuild
are "basically equivalent", but the commands I'm trying to execute sometime succeed with one but fail with the other.e.g.
dotnet fake build --list
lists my targets, butdotnet fake run --list
fails with a useless error message.The
Usage:
section of the--help
indicates that bothrun
orbuild
are basically identical, with everything following them being optional, but as per my previous example, it seems that's actually not true! (at least some of the time)-- SCRIPT ARGUMENTS SECTION --
showing usage withfake-run
?fake-run
an actual command? Something used in place ofdotnet fake run
?I know that
--
is somewhat standard in many CLI tools, but neither the--help
nor the docs explain what it does and when it is supposed to be used. My understanding is that it's to disambiguate that something is supposed to be ascriptargs
, but can be omitted when thescriptargs
does not conflict with afake-cli
existing option or command.--
?Maybe some basic examples of everyday commands would be useful in the
--help
?(instead of the current example of
fake -v build -- --list
— I can feel that it's trying to demonstrate an important point, but I'm not completely sure I get it, so it's actually more scary than useful...)Thank you for your time.
The text was updated successfully, but these errors were encountered: