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.
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 ?
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.
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.
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)
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 ?
When you say dev branch. Is that buildwrapper or eclipse ?
Will try it out.
EclipseFP. Get the source from github.
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 ?
Yes, you need the Eclipse Web Development plugin, the "Installation" EclipseFP page lists what you need:
Ok, now builds.
Still can't get a clean build on a new project I get
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.
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.
sorry yes can build eclipse fp. latest dev doesn't fix the issue.
any ideas ?
On holidays. Will try to reproduce when I'm back.
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
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)
Great, will try.
Whats the dep issue ? As it's fine from the command line. Picking up something globally from my install ?
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.
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.
http://neilmitchell.blogspot.fr/2008/02/adding-data-files-using-cabal.html may help you. What exactly do you do on the command line that works, and in EclipseFP that doesn't? The working folder should always be the project root folder.
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.
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.
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?
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 ?
Works here in 3.8. If you go into run configurations, you should see the run configuration for perf-test under Haskell Application, check the current directory there. If wrong, try to delete the configuration and run as executable again, to check that it's recreated properly. If not recreated properly, then we have a bug that I can't reproduce (on my OS there was only Eclipse 3.8 available). If wrong, can you change it manually and checks it solves your problem, so that at least we know there's a manual workaround?
Odd, i moved the project out of another git repo into it's own and hence diff directory. Just copied the files and created a new repo. Destroyed the eclipse project. And created a new one of the same name pointing at the new location.
Somehow I get stuff in .dist-buildwrapper in the old directory even though that was deleted as well. Appears something in eclipse is carrying over prefs between project creations and the move of the directory.
The cwd of the app when running is of the old directory before the move.
Want any info before I trash the workspace ???
I'd say it's normal, because launch configurations are kept in the eclipse workspace metadata, so deleting the project and recreating it can reuse old configs (same project name, same module name). I'll see if I can add a listener on project deletions to delete all haskell run configurations linked to that project.
ok will rename the project to work around. Ta
Done in 2.5.3: when deleting a project, the launch configurations created by EclipseFP are deleted too.
Great thanks !
Log in to post a comment.