Skip to content

Redundant output when running stack with previously installed msys2 #1495

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

Closed
asampal opened this issue Dec 11, 2015 · 7 comments
Closed

Redundant output when running stack with previously installed msys2 #1495

asampal opened this issue Dec 11, 2015 · 7 comments

Comments

@asampal
Copy link

asampal commented Dec 11, 2015

I had msys2/mingw already installed on my Windows system and ran stack --skip-msys setup to install GHC without another copy of msys2 being installed.

Now, when I run a stack command, say stack ghci, I get the following line as part of the output of that command: Continuing despite missing tool: msys2. If I run stack --skip-msys ghci that line is not output.

This is wrong, with or without the --skip-msys option, given that I do have msys2 installed. Where is stack looking to make it think that it's missing? Building a newly created project works, btw.

@mgsloan
Copy link
Contributor

mgsloan commented Dec 12, 2015

That output comes from here. It thinks that it isn't installed because it isn't in the list of installed programs.

I suppose we ought to do something similar to what we do for GHC - it finds the ghc executable and asks for its version.

@asampal
Copy link
Author

asampal commented Dec 12, 2015

When you say 'list of installed programs', what are these? It wasn't clear to me, looking at the source where you pointed. Is it a subset of the tools that come with msys2/mingw? Is msys2 expected to be in a specific place on the filesystem?

@mgsloan
Copy link
Contributor

mgsloan commented Dec 12, 2015

It's looking in the spot that it's installing programs. On windows, IIRC, this is in some sort of app data folder within your user folder. One nice thing about this is that we can rely on the directory including the version of the program installed.

This isn't that big of a deal with msys, though, I don't think we control msys versions. So maybe it would be sufficient to just check if some particular msys stuff is on the PATH, and consider the tool installed in that case.

@asampal
Copy link
Author

asampal commented Dec 12, 2015

I'd say that your last suggestion is what would make the most sense. Figure out the subset of tools to check for on the path, along with their versions, and you should be OK. Also, for the MinGW tools, which would usually be installed along with MSYS2, MINGW_HOME would typically be set.

@mgsloan
Copy link
Contributor

mgsloan commented Dec 12, 2015

Yup, feel free to make the necessary changes and open a PR!

@asampal
Copy link
Author

asampal commented Dec 12, 2015

That will have to wait since I'm a total noob at Haskell.

@mgsloan
Copy link
Contributor

mgsloan commented Dec 12, 2015

Gotcha, no worries :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants