So the error seems to be "java.lang.IllegalArgumentException: /FER/src/dz07.hs is in no source folder in project FER". Obviously this message makes absolutely no sense, since I do indeed have a dz07.hs in source folder in project FER. Also, my previous Run configurations work fine, but this error prevents new ones from being created. I can't even create a manual run configuration.
How do I fix this? I can run an old configuration and type ":l src/myNewFile.hs" and GHC works, but when I need to restart it (endless loop etc.) I obviously need to repeat the process, instead of just pressing CTRL+R (that's what I bound to Run).
On another matter, whenever I start up Eclipse, a dialog popups up asking me "Do you want to download Hoogle database" or somesuch, no matter if I press yes or no, the dialog will pop up again on the next restart. Ugh. Is there a way to disable this? It's annoying. How come nobody caught this during testing? :)
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, but is src marked as a source folder in your cabal file?
The hoogle database download message obviously doesn't appear all the time for everybody, otherwise as you said we would have caught it. Any other messages in the Error Log or in the scion-browser console output?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-01-06
I don't think I have a cabal file. I mean, there's (projectName).cabal right there in the Workspace, but there's no cabal file in the actual directory, and under the Source tab (when I double click on it in Workspace) it says "Resource 'FER/FER.cabal' does not exist".
Shared scion-browser instance view doesn't show any special error messages.
Well, a big premise of EclipseFP is that you have a cabal file that has all the information about your project. But anyway I have fixed the code so that you can start a GHCI session on any file, even if not contained in a source folder.
When I talk about a source folder, I mean a folder referenced by a hs-source-dirs field in the cabal file of your project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-01-06
How can I create such a cabal file? Do I need to create a new project, and then copy all my old sources into it?
Also, how can I get the latest updates? I just started Eclipse, it says No updates found.
Thanks for the help! I really like EclipseFP (other than these bugs). :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just create a new file into your project, at the root, called FER.cabal. Then the editor will work.
When I say "I fixed the code", I mean in the development version, so it's not available straight away via the updates site. I think a new version will be released maybe next week. EclipseFP depends on Haskell packages that are now released independently (but the latest versions have API changes, so we need to release everything at once), so we may be able to release more often. But there are only at the moment 2 developers working in their free time on it.
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-01-08
Cool! Thanks. Running my new file works fine now. Next week is fine too.
Now I'm back to the old problem, though. I restarted Eclipse and now I can't open my new homework file (dz07) in the Haskell editor (Argument not valid) while my old one (dz06) works fine. :| Also, while I was working, the syntax highlighting (etc.) worked fine, but it suddenly won't work anymore after a restart. Oh well, at least I can run it. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sandro, the issue you're referring to should be fixed in buildwrapper. buildwrapper is a haskell executable that is used by EclipseFP but released independently. Just run cabal install buildwrapper or use the cabal package view in EclipseFP. Once your buildwrapper executable is rebuilt the error should go away. If it doesn't please open a new incident on the forum with the source that refuse to open.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-01-08
I did. After about 5-10 minutes and a gazillion different warnings (I guess none are related to EclipseFP, but I find them weird since Haskell is all about "purity" and stuff like that), I get (I hope this is the correct output):
Anyway, I just tried to open dz07 with Haskell Editor and I still get Could not open the editor: Argument not valid.
Here are some interesting messages I get in Buildwrapper output:
buildwrapper.exe: user error (You need to re-run the 'configure' command. The version of Cabal being used has changed (was Cabal-1.10.2.0, now Cabal-1.10.1.0).)
(they repeat every few seconds, infinite loop).
Now, I admit that I had been using an older version of Haskell, and updated when the new version came out recently, but why does it say that it's *now* using and *old* version of Cabal? I *upgraded* Haskell, not downgraded it. I also tried doing what the message suggests (going to the project directory and under admin rights typing cabal upgrade - which completes fine), but it doesn't seem to help.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-01-08
*cabal configure, not upgrade. Stupid forum without edit functionality.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Mmmhhhh… The warnings when you build are normal, it's not linked to Haskell being pure or not, it's about things being defined but not used or things having names that exist somewhere else, nothing to worry about.
The cabal error is more worrying. I have seen it before but without being able to pinpoint what was wrong, but it was also after playing with version of cabal and such. Running cabal configure directly is not going to help, because buildwrapper does not use the same folder as cabal you launch via the command line. There should be a .dist-buidwrapper folder in your project. Delete it, it should be recreated automatically, see if this helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-01-08
I tried that, no luck though. :(
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
my newer Haskell sources open fine now (see https://sourceforge.net/projects/eclipsefp/forums/forum/371922/topic/4654268), however now I ran into another problem.
When I try to run my newly-created .hs file, I get this under the Error log view:
So the error seems to be "java.lang.IllegalArgumentException: /FER/src/dz07.hs is in no source folder in project FER". Obviously this message makes absolutely no sense, since I do indeed have a dz07.hs in source folder in project FER. Also, my previous Run configurations work fine, but this error prevents new ones from being created. I can't even create a manual run configuration.
How do I fix this? I can run an old configuration and type ":l src/myNewFile.hs" and GHC works, but when I need to restart it (endless loop etc.) I obviously need to repeat the process, instead of just pressing CTRL+R (that's what I bound to Run).
On another matter, whenever I start up Eclipse, a dialog popups up asking me "Do you want to download Hoogle database" or somesuch, no matter if I press yes or no, the dialog will pop up again on the next restart. Ugh. Is there a way to disable this? It's annoying. How come nobody caught this during testing? :)
Thanks.
Yes, but is src marked as a source folder in your cabal file?
The hoogle database download message obviously doesn't appear all the time for everybody, otherwise as you said we would have caught it. Any other messages in the Error Log or in the scion-browser console output?
I don't think I have a cabal file. I mean, there's (projectName).cabal right there in the Workspace, but there's no cabal file in the actual directory, and under the Source tab (when I double click on it in Workspace) it says "Resource 'FER/FER.cabal' does not exist".
Shared scion-browser instance view doesn't show any special error messages.
Here are a few recent messages in the error log:
This one is old (unable to open editor: argument not valid):
No, I don't have any tabs in any of my files, except in my .project XML file.
Thanks.
Well, a big premise of EclipseFP is that you have a cabal file that has all the information about your project. But anyway I have fixed the code so that you can start a GHCI session on any file, even if not contained in a source folder.
When I talk about a source folder, I mean a folder referenced by a hs-source-dirs field in the cabal file of your project.
How can I create such a cabal file? Do I need to create a new project, and then copy all my old sources into it?
Also, how can I get the latest updates? I just started Eclipse, it says No updates found.
Thanks for the help! I really like EclipseFP (other than these bugs). :)
Just create a new file into your project, at the root, called FER.cabal. Then the editor will work.
When I say "I fixed the code", I mean in the development version, so it's not available straight away via the updates site. I think a new version will be released maybe next week. EclipseFP depends on Haskell packages that are now released independently (but the latest versions have API changes, so we need to release everything at once), so we may be able to release more often. But there are only at the moment 2 developers working in their free time on it.
Thanks!
Cool! Thanks. Running my new file works fine now. Next week is fine too.
Now I'm back to the old problem, though. I restarted Eclipse and now I can't open my new homework file (dz07) in the Haskell editor (Argument not valid) while my old one (dz06) works fine. :| Also, while I was working, the syntax highlighting (etc.) worked fine, but it suddenly won't work anymore after a restart. Oh well, at least I can run it. :)
Sandro, the issue you're referring to should be fixed in buildwrapper. buildwrapper is a haskell executable that is used by EclipseFP but released independently. Just run cabal install buildwrapper or use the cabal package view in EclipseFP. Once your buildwrapper executable is rebuilt the error should go away. If it doesn't please open a new incident on the forum with the source that refuse to open.
I did. After about 5-10 minutes and a gazillion different warnings (I guess none are related to EclipseFP, but I find them weird since Haskell is all about "purity" and stuff like that), I get (I hope this is the correct output):
Anyway, I just tried to open dz07 with Haskell Editor and I still get Could not open the editor: Argument not valid.
Here are some interesting messages I get in Buildwrapper output:
buildwrapper.exe: user error (You need to re-run the 'configure' command. The version of Cabal being used has changed (was Cabal-1.10.2.0, now Cabal-1.10.1.0).)
(they repeat every few seconds, infinite loop).
Now, I admit that I had been using an older version of Haskell, and updated when the new version came out recently, but why does it say that it's *now* using and *old* version of Cabal? I *upgraded* Haskell, not downgraded it. I also tried doing what the message suggests (going to the project directory and under admin rights typing cabal upgrade - which completes fine), but it doesn't seem to help.
Thanks.
*cabal configure, not upgrade. Stupid forum without edit functionality.
Also, I'm using:
Mmmhhhh… The warnings when you build are normal, it's not linked to Haskell being pure or not, it's about things being defined but not used or things having names that exist somewhere else, nothing to worry about.
The cabal error is more worrying. I have seen it before but without being able to pinpoint what was wrong, but it was also after playing with version of cabal and such. Running cabal configure directly is not going to help, because buildwrapper does not use the same folder as cabal you launch via the command line. There should be a .dist-buidwrapper folder in your project. Delete it, it should be recreated automatically, see if this helps.
I tried that, no luck though. :(
Thanks.
Here's dz07 (which cannot be opened in Haskell Editor): http://pastebin.com/7aMjXxRH
And dz06 (which can be opened normally in Haskell Editor with full syntax highlighting): http://pastebin.com/60MtsSHy
Well, I decided to totally uninstall Haskell and EclipseFP. Worry not, I only did it to reinstall it. :)
Now I created a new project, copied my old sources and things seem to work fine, every file seems to be opening normally (at least for now).
Thanks for all your help!