Multiple compilation output iin console?

Help
2013-02-18
2013-12-28
  • Vlatko Basic

    Vlatko Basic - 2013-02-18

    I'm running Eclipse Juno, FP 2.4.2.

    When I save the file, it seems it compiles the file three times.

    This is the output in console when there is an error:

    *Main> [1 of 1] Compiling Main ( ../Testing/src/Main.hs, interpreted )

    ../Testing/src/Main.hs:50:9:
    Not in scope: `y'
    Failed, modules loaded: none.
    Prelude> [1 of 1] Compiling Main ( ../Testing/src/Main.hs, interpreted )

    ../Testing/src/Main.hs:50:9:
    Not in scope: `y'
    Failed, modules loaded: none.
    Prelude> [1 of 1] Compiling Main ( ../Testing/src/Main.hs, interpreted )

    Failed, modules loaded: none.
    Prelude> ../Testing/src/Main.hs:50:9:
    Not in scope: `y'

    And this is without errors:

    [1 of 1] Compiling Main ( .../Testing/src/Main.hs, interpreted )
    Ok, modules loaded: Main.
    Main> Ok, modules loaded: Main.
    Main> Ok, modules loaded: Main.
    *Main>

    Is my config wrong,, or should it be like this?

     
  • JP Moresmau

    JP Moresmau - 2013-02-18

    Yep, seems to be that Eclipse sends several events when the file is modified only once, I've never noticed before, but in my case I only get two messages. So nothing wrong your side. I'll see what I can do.

     
  • JP Moresmau

    JP Moresmau - 2013-02-18

    OK, I'll check for the "markers" flag, which means the change comes from the editor, and not from other notifications, solves the issue. Thanks.

     
  • Vlatko Basic

    Vlatko Basic - 2013-02-27

    Just upgraded to 2.5.0. The compiling after save does not work. Must terminate console and re-run the project to see the changes I made. Also, no output at all in console after the save.

    In status bar I see "Building workspace", then "Building project xxx" and then "Running executable /usr/bin/ghc", but seems compilation is not taking place.

    Buildwrapper upgraded also to 0.7.0 (if I recall correctly)

    Also noticed a message in red:
    on the commandline:
    Warning: -fglasgow-exts is deprecated: Use individual extensions instead"

    (Not sure if that was showing before.)

     
  • JP Moresmau

    JP Moresmau - 2013-02-27

    You're confusing compilation and refresh in GHCi. Your project compiles and builds ok, and GHCi is running, which is what's you're seeing. Are you sure that the refresh modules on save option is checked on your run configuration?

     
  • Vlatko Basic

    Vlatko Basic - 2013-02-27

    You're right about my compilation confusion. I tried :load after save and module works according to changes.

    I looked at "Reload packages on save" and it is checked.

     
  • Vlatko Basic

    Vlatko Basic - 2013-02-27

    It started working after I ran it in Debug mode. Restarted Eclipse to check and still works both in Run and in Debug mode.

    Thanks for solving the main issue so quickly! :-)

     
  • Vlatko Basic

    Vlatko Basic - 2013-03-20

    Refresh in console occasionally stops, and new run/debug must be started. Sometimes it works for few tens of runs, sometimes just a couple, and sometimes not working even once when a new run/debug started.

    Couldn't pinpoint what might be the trigger. With errors in the file or just a change inside the string, it doesn't matter.

    Refresh doesn't start working after :load Main.

    Noticed that after refresh stops, Ctrl+F2 (to terminate run/debug) is not working any more. Must kill it with menu or mouse.

    EDIT: Just updated to 2.5.2, and problem is still there.

    EDIT2: Tried with fresh clean Eclipse install "eclipse-jee-juno-SR2-linux-gtk-x86_64" and FP 2.5.2 only, and the problem is still there.

     
    Last edit: Vlatko Basic 2013-03-20
  • JP Moresmau

    JP Moresmau - 2013-05-09

    I've tried several times but I can reproduce the issue. I start a GHCi session on a module, and everytime I change the module and save it it gets reloaded in GHCi.

     
  • Vlatko Basic

    Vlatko Basic - 2013-07-02

    In version 2.5.3 the saved module is loaded three times again, but now the refresh in console works on every save (no more need for :reload), so I vote for leaving it this way. :-)

     
  • JP Moresmau

    JP Moresmau - 2013-07-07

    It's a pain. I thought I had fixed it in Juno, but then it didn't work in 3.X, so I put it back as it was... It should be tested thoroughly in both the 3.X and 4.X versions of Eclipse...

     
  • JP Moresmau

    JP Moresmau - 2013-12-28

    OK, thank you Vladimir, I'm integrating your suggestion.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks