Skip to content
This repository has been archived by the owner on Mar 14, 2021. It is now read-only.

build of project is not done #204

Open
andrewufrank opened this issue Mar 4, 2017 · 2 comments
Open

build of project is not done #204

andrewufrank opened this issue Mar 4, 2017 · 2 comments

Comments

@andrewufrank
Copy link

i use the test-stack-multiproject (https://github.com/lierdakil/test-stack-multiproject.git) setup to experiment and reconstruct problems i observe:

checking a module when saving is promptly done (and usually without a ghc-mod crash), but changes in other modules are not used.
for example: change in LibA.hs the type of thirdFunc to String -> IO (). save. there is no indication that Main.hs in a is now wrong. Fix Main.hs by adding the now missing argument. result: wrong error message (because the change in a is not seen).

i do not see how to run build from within atom. build project seems not to do anything in this setup.

the build target seems to depend on the file which has the focus. Correct? if yes, then it is very subtle. if i try to set the target manualy, i.e. typing a into the field set build target i get Uncaught TypeError: string.indexOf is not a function.

using stack build in the project dir does of course build the project, despite the error message when saving Main.hs.

can you reproduce this behavior? i would suggest that the target can be selected by typing the package name.

i also found that the need to select the mode of buidling (stack/cabal/none) with a not very prominent button is confusing - why not include it in the ghc-mod settings. i do not expect that users change this very often.

in general, it works, but i hope you can further improve it!

@lierdakil
Copy link
Contributor

lierdakil commented Mar 5, 2017

i also found that the need to select the mode of buidling (stack/cabal/none) with a not very prominent button is confusing - why not include it in the ghc-mod settings. i do not expect that users change this very often.

I, for one, have projects that are built with cabal, projects that are built with stack, and projects which are built with both. So I beg to differ. Also, if nothing is selected, and a value is required, a selection dialog should pop up. haskell-ghc-mod ignores this setting at the moment, btw, and relies on ghc-mod's autodetection (which will be changed eventually, but it guesses right in most circumstances)

the build target seems to depend on the file which has the focus. Correct? if yes, then it is very subtle. if i try to set the target manualy, i.e. typing a into the field set build target i get Uncaught TypeError: string.indexOf is not a function.

Target selection parses cabalfile, so that's a problem if there is none. Auto does try to guess what you want to build depending on currently active editor (this is primarily to match user expectation of building currently open tests and benchmarks when project isn't explicitly configured to use them).

Please note that target selection is not superproject-aware. Currently recommended way of dealing with superprojects is to open each sub-project with File → Add Project Folder, if you need full control over build targets. If you don't Auto: All should work well enough in most circumstances.

The error is fixed in ide-haskell v1.9.5. Thanks for letting me know.

i do not see how to run build from within atom. build project seems not to do anything in this setup.

Command is ide-haskell-cabal:build. You need ide-haskell-cabal package. Don't mind the awkward name choice, it supports stack as well -- during that project's infancy, nobody as much as thought about stack support.

There is no support for Atom-Build integration at the moment.

@andrewufrank
Copy link
Author

thank you for your careful answer!
just for curiosity, why would you have cabal and stack build in one project? (probably off topic).

i will try Auto:All as build target (just loaded the new ide-haskell 1.9.5 - thank you for the fix). what would be the syntax if repeatedly build the one of the subprojects?
i did not understand the idea to add each subproject individually; i like to have a big project to keep all the changes in the same git repository (and synchronized). build with ctrl-alt-/ works, but it is not always easy to tell, what it builds. i would like that i can set this and it would be reused - i have often to repeatedly build the same main after some changes.

thank you for a great tool!

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

No branches or pull requests

2 participants