-
Notifications
You must be signed in to change notification settings - Fork 841
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
Improve UI for stack setup --stack-setup-yaml
option
#2647
Comments
Did you see the help text?
Given that the option causes a failure when supplied with a bogus argument
and succeeds when supplied with the default argument
it seems to work as intended. The option probably didn't have an effect in your case as the compiler was already present. Given that no corresponding If it stays, the help text should be made clearer (it doesn't say what the file is used for), and it should be checked if the argument is actually a URL. |
Introduced with 54c34c5. It's over a year old. What would be a better description? Here's a stab:
Probably needs the name of the issue changed to be more relevant. |
I did see it. That's where I got the idea to use the flag from. Am I supposed to know what “the main stack-setup.yaml” is? As I said, I didn't find anything documenting that flag or the help text.
It doesn't always fail. This is what I saw:
Actually, that should not be using GHCJS since the Since you point out that it fails for a nonexistent file, I wonder what it's doing with the file I provide. I ran @lwm: I'm also not sure what a “stack.yaml for setup related .tar files” is. This doesn't mean the message needs to be more verbose, but whatever is put there perhaps could be expanded on with documentation in the guide. It seems that |
Ok, that confirms that the option info needs to be improved. ;)
As I indicated above, the argument isn't used unless a compiler (or other tool) has to be downloaded. In your case the compiler was determined by your project's default
How about The argument metavar should also be For the help text, how about
? |
Okay, now I finally understand what the flag does: it indicates where tools are downloaded from and is only used if a download is needed. That was not clear from the statement that “the option probably didn't have an effect in your case as the compiler was already present.” Perhaps the above would be a good note to have in the help text or documentation.
That's interesting. Is it reasonable to describe the argument to As for the help text, would it be better to be more specific and refer to sources for download (rather than use a vague term such as “metadata”), as mentioned in the |
Just a quick note: the Also, this is a valid
Both things should be documented. Oh, and given that this command-line flag is only the analogon to the PRs welcome! |
stack setup --stack-setup-yaml
option
I agree that Scripts might use it, so may be better to update the docs. I'm ambivalent as to the approach, though leaning towards deprecating and changing it. |
Should stack print a warning when the deprecated option is used? |
I suppose so? For example:
|
Ah, haven't checked out how they handle deprecation, though the code there (in https://github.com/commercialhaskell/stack/blob/master/src/Stack/Path.hs) is not really compatible with what happens here. But yeah, they print warnings outside the commands. |
Is the
--stack-setup-yaml
flag ignored bystack setup
? If I pass something with that flag, it doesn't seem to affect the operation. The only place I see--stack-setup-yaml
mentioned is in the Changlog entry for v0.1.5.0.The reason I'm bringing this up is that I was confused for a bit trying to specify a different
stack.yaml
file other than the default. I eventually realized it should bestack --stack-yaml <file> setup
. So having bothstack setup --stack-setup-yaml <file>
andstack --stack-yaml <file> setup
is confusing. If--stack-setup-yaml
is not being used, I think it should be removed.The text was updated successfully, but these errors were encountered: