Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Cabal install deps & cabal-dev

Help
2013-04-22
2013-05-13
1 2 > >> (Page 1 of 2)
  • Graham Berks
    Graham Berks
    2013-04-22

    Does the menu option 'cabal install deps' work with cabal-dev ?

    I presume it does as I can see deps being installed in the .dist-buildwrapper/cabal-dev.

    I ask because when I cleared out a project as a test and created it from scratch. No deps were automatically installed hence I chose this option.

    It appears to look at my main package installs for ghc and mentions difference ie.

    Resolving dependencies...
    In order, the following would be installed:
    containers-0.5.2.1 (new version)
    abstract-deque-0.1.6 (reinstall) changes: containers-0.4.2.1 -> 0.5.2.1

    which I'm not expecting with cabal-dev or does it only pull in new packages if it cannot already find it ?

    Thanks

     
  • JP Moresmau
    JP Moresmau
    2013-04-22

    No, you shouldn't use cabal install deps if you use cabal-dev. The current version in dev will give you a warning. If you use cabal-dev, cabal-dev install deps is done automatically for you by EclipseFP when your project is configured, and running the cabal wizard will cause dependencies to be installed in your user package database, which is probably not what you want if you're using cabal-dev.
    Please note that cabal-dev always look in the system database anyway.

     
  • Graham Berks
    Graham Berks
    2013-04-22

    It's a repeatable issue.

    When I clean out the project files and create a new one from eclipse I get

    configuring because setup_config not present
    cabal: At least the following dependencies are missing:
    containers ==0.5.2.1, split -any

    If I prod cabal-dev with 'cabal-dev -s .dist-buildwrapper/cabal-dev/ install --enable-tests' it sorts everything out and then eclipse is fine.

    I can give any details of the source of the project if helps.

    Thanks

     
  • JP Moresmau
    JP Moresmau
    2013-04-22

    Are these dependencies from a test-suite cabal section? Because we forgot to pass --enable-tests to cabal-dev install deps (fixed in dev branch)

     
  • Graham Berks
    Graham Berks
    2013-04-22

    It's on both the main exec and the two tests.

    Cabal file is at https://gist.github.com/fatlazycat/5438175

    Would this be the issue ?

     
  • Graham Berks
    Graham Berks
    2013-04-23

    When you say dev branch. Is that buildwrapper or eclipse ?

    Will try it out.

     
  • JP Moresmau
    JP Moresmau
    2013-04-23

    EclipseFP. Get the source from github.

     
  • Graham Berks
    Graham Berks
    2013-04-23

    When i build get the following errors - see attached.

    I installed birt charting engine but didn't install the buildwrapper from source as I assumed my one is new enough.

    When I tried to export the plugin i get errors. 12 of them in net.sf.eclipsefp.haskell.ui_2.5.3

    I'm using eclipse classic 4.2.2

    Anything I need todo ?

    Thanks

     
    Attachments
  • JP Moresmau
    JP Moresmau
    2013-04-23

    Yes, you need the Eclipse Web Development plugin, the "Installation" EclipseFP page lists what you need:
    Web Platform Tools: needed to highlight and provide autocompletion for web-related files. To install it, follow the same steps of the main installation, but use http://download.eclipse.org/webtools/repository/indigo/ (or http://download.eclipse.org/webtools/repository/juno if you're using Eclipse Juno) as the update site. You'll need the Eclipse Web Developer Tools, Eclipse XML Editors and Tools, JavaScript Development Tools, Web Page Editor components, depending on which languages you use.

     
  • Graham Berks
    Graham Berks
    2013-04-24

    Ok, now builds.

    Still can't get a clean build on a new project I get

    configuring because setup_config not present
    cabal: At least the following dependencies are missing:
    containers ==0.5.2.1, split -any

    configuring because setup_config not present
    cabal: At least the following dependencies are missing:
    containers ==0.5.2.1, split -any

    configuring because setup_config not present
    cabal: At least the following dependencies are missing:
    containers ==0.5.2.1, split -any

    I have an older version of containers in my ghc libs, would this cause the conflict mentioned ?

    I build with the command line - cabal-dev -s .dist-buildwrapper/cabal-dev/ install --enable-tests it all builds and runs fine. Just appears to get on and install the required version of containers.

     
    Last edit: Graham Berks 2013-04-24
  • JP Moresmau
    JP Moresmau
    2013-04-25

    The dev page http://eclipsefp.github.io/dev.html explains how to get a test configuration going from Eclipse itself.
    If you want to run it straight, run the export wizard on the feature, this will create plugins and features in a directory of your choosing. Unfortunately there is no update site project under github (I don't know why, was like that when I took over EclipseFP and I've never changed it), so you can either create a new update site using Eclipse wizards, or get the official site.xml file from the update site and modify it to add a new version.

     
  • Graham Berks
    Graham Berks
    2013-04-25

    sorry yes can build eclipse fp. latest dev doesn't fix the issue.

     
  • Graham Berks
    Graham Berks
    2013-05-02

    any ideas ?

    thanks

     
  • JP Moresmau
    JP Moresmau
    2013-05-05

    On holidays. Will try to reproduce when I'm back.

     
  • JP Moresmau
    JP Moresmau
    2013-05-08

    I can't reproduce the issue. I've created an empty executable, and pasted in your dependency list. I got an error that containers ==0.5.2.1 was missing. I did clean, and then it worked. However, I get a warning in the console that attoparsec is using a older version of container, which is weird since there is no bounds on versions in the latest attoparsec.
    If you want to send me the full project, just do a sdist and send it to jp_at_moresmau.fr

     
  • JP Moresmau
    JP Moresmau
    2013-05-08

    OK, after getting https://github.com/fatlazycat/wordcounting I see the following problem: even though we install dependencies in a sandbox, cabal complains that some packages are going to break other packages in the system database. Presumably this will only affect the sandbox so shouldn't be an issue. I've added the --force-reinstall flag to the cabal-dev install-deps call and now everything works (well, the WordCounting module doesn't compile in the executable because of a missing dependency, but that's unrelated). So pull from github if you still have the dev version. (https://github.com/JPMoresmau/eclipsefp/commit/9ce780d187971e4fc0e00ba3bd7a6e4655cae09c)

     
  • Graham Berks
    Graham Berks
    2013-05-08

    Great, will try.

    Whats the dep issue ? As it's fine from the command line. Picking up something globally from my install ?

    Thanks

     
  • JP Moresmau
    JP Moresmau
    2013-05-08

    I get issues about breaking haskell-platform and such. I'm not sure this is your issue since you're right, it should do the same from the command line... Look at all the console output for your project and see any error that may crop up.

     
  • Graham Berks
    Graham Berks
    2013-05-08

    I do have one from running within eclipsefp ( old version ) haven't had time to try the fix with regards current working dir. When I try to locate a resource file - test.txt it works from cmd line but not from eclipsefp now ( pretty sure it did before but have taken out the dev built one and put back 2.5.2 ). Should eclipsefp have the same working dir as say using cabal-dev from the root dir of the project ? Is there better way of finding test resource files in haskell that you know of ? I come from a maven jvm world.

     
  • Graham Berks
    Graham Berks
    2013-05-09

    Thanks, in my current project eclipsefp doesnt appear to gave the root of the root of the project as the cwd. If run tests via cabal-dev it finds test.txt in the test directory. If I run through eclipsefp it does not and the test fails.

     
  • Graham Berks
    Graham Berks
    2013-05-10

    Thanks, with the dev build and a new project it all resolves and builds fine. Thanks.

    Still getting an issue where it cannot find the test.txt, appears the cwd is somehow wrong.
    Will attempt to determine what the cwd is within the running haskell prog.

    Works fine from the cmd line.

     
  • Graham Berks
    Graham Berks
    2013-05-10

    Thanks, with the dev build and a new project it all resolves and builds fine. Thanks.

    Still getting an issue where it cannot find the test.txt, appears the cwd is somehow wrong.
    Will attempt to determine what the cwd is within the running haskell prog.

    Works fine from the cmd line.

     
  • JP Moresmau
    JP Moresmau
    2013-05-10

    I run your perftest in wordcounting, both from the generated executable and GHCI (inside EclipseFP), both work fine, I suppose (no error, I get criterion results). So can you tell me exactly what's you're doing, very precisely?

     
  • Graham Berks
    Graham Berks
    2013-05-10

    In the project explorer, right click the test suite for perf-test and choose run as executable. I get the following output

    perf-test: test/test.txt: openFile: does not exist (No such file or directory)

    Am running juno, if that might be a diff ?

     
1 2 > >> (Page 1 of 2)