-
Notifications
You must be signed in to change notification settings - Fork 109
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
add a switch to select between cabal new-build or stack build #429
Comments
cabal has a similar problem when you have more than one I think we need to add the concept of a "Project" file to Leksah. This could be a If the project file is a It the project file is a |
@hamishmack i think your suggestion is sensible, but i have since learned, that stack assumes that multi-package modules use extra-dep for packages other than the major one and to load them individually. |
dear hamish
this is an excellent solution - if it is easy to realize. i am back
using leksah (having tried a number of other solutions) but found leksah
more fluent and swifter - and after a while i understand the trickts to
avoid problems. most annoying is that panes are moved with keys only
and, of course, the need to have stack.yaml files in all projects and
subprojects.
is this easy to realize?
andrew
ps. i did an install of 16.2. and found a bug in a file (types changed
from string to maybe string or similar) and fixed them. i am not very
experienced how to post such a change to you... (it is in an issue
pasted). can you check and integrate?
…On 02/21/2017 06:59 PM, Hamish Mackenzie wrote:
cabal has a similar problem when you have more than one
|cabal.project| files in different parent folders. Leksah runs the
|cabal new-build| in the directory of the cabal file so it uses the
|cabal.project| in the inner most directory.
I think we need to add the concept of a "Project" file to Leksah. This
could be a |cabal.project| or a |stack.yaml| file. Instead of adding
the individual packages you could add the project. It would show as a
parent node in the workspace with the packages as children.
If the project file is a |.yaml| file leksah would use |--stack-yaml|
to pass it to stack when building packages.
It the project file is a |.project| file leksah would set the current
directory to the directory of the project and use |--project-file| to
pass the filename.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#429 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA4p0JOozVaNxriJVsF_pjqH3LeUIGKbks5reyXogaJpZM4MHa0T>.
--
em.o.Univ.Prof. Dr. sc.techn. Dr. h.c. Andrew U. Frank
+43 1 58801 12710 direct
Geoinformation, TU Wien +43 1 58801 12700 office
Gusshausstr. 27-29 +43 1 55801 12799 fax
1040 Wien Austria +43 676 419 25 72 mobil
|
i have tried a leksah fork with a flag in preferences which always uses stack build (i can send you a pull request). BUT: there is a problem in stack with the described scenario (see issue in stack #3168) which is not consistently handled correctly. if i can force leksah to use always the selected 'active package' as target and never another one (for which no stack.yaml file is present, or for which a stack.yaml file exist but should not be used) then it would work. at the moment, my fork of leksah tries to access stack.yaml files and crashes.. |
the current solution works - at least for stack.yaml! jan 2018, 16.3.1 |
the current method to decide based on the presence of a
stack.yaml
file whether to use the cabal new-build approach or stack build is not working and can probably not be fixed.stack uses a central (hierarchically higher) directory to select the build-plan and stores there the results. this can be used with a dummy (
stackroot.cabal
) haskell project in this central directory. if leksah needs to update a package in the project (where nostack.yaml
files must be present) it goes to cabal new-build and fails. with a switch, in stead of sensing the presence of a file, stack build could started and work properly.The text was updated successfully, but these errors were encountered: