Updating a *.y file does not trigger rebuild

  • Tsuyoshi Ito

    Tsuyoshi Ito - 2012-05-01

    I have encountered a strange problem when I use Happy with EclipseFP.  When I modify a *.y file in a Haskell project, EclilpseFP seems to update the corresponding *.hs file, but does not recompile the other files depending on this *.hs file.

    Maybe I am not using EclipseFP correctly, but I cannot find out how to get it work.  Any help would be appreciated.

    Steps to reproduce:

    1. Download https://github.com/downloads/ti1024/eclipsefp-happy/happy-test-0.1.tar.gz somewhere.
    2. In Eclipse, choose File - Import, and then Haskell - Cabal Package as Project.
    3. Enter “happy-test” as project name, and choose the file (happy-test-0.1.tar.gz) downloaded in step 1.
    4. Wait until the project is built.
    5. Modify src/Calc.y so that it will cause a different behavior, and save it.

    (The same problem occurs if I create a new project in EclipseFP and add a Happy file there.)


    After step 5, the executable file is not regenerated.


    After step 4, Calc.hs appears in three directories: src, .dist-buildwrapper/src, and .dist-buildwrapper/dist/build/happy-test/happy-test-tmp.  After step 5, src/Calc.hs is updated, but the files Calc.hs in the other two directories are not updated.  This looks suspicious.

    When I use Cabal without Eclipse, Calc.hs is generated only in directory dist/build/happy-test/happy-test-tmp, so the fact that EclipseFP generates Calc.hs in src directory seems already strange.


    * EclipseFP 2.2.4
    * buildwrapper-0.5.2
    * Eclipse SDK 3.7.2 (Build id: M20120208-0800)
    * Haskell Platform 2011.4.0.0
    * Windows 7 (64-bit edition)

  • JP Moresmau

    JP Moresmau - 2012-05-01

    You are right. For some reason we do not rebuild the executable if a derived file is modified, which is a bug. So your HS file does get generated by the Happy builder, but then the project doesn't realize that the hs file has changed and hence the exe needs to be rebuilt.
    This has been fixed on github and will be part of the next release of EclipseFP. In the meantime, you'll either have to touch a non deriver hs file in your project to get it to rebuild, or move to manual building in Eclipse (uncheck the build automatically checkbox in the preferences)

  • Tsuyoshi Ito

    Tsuyoshi Ito - 2012-05-01

    Thank you for fixing it.  I look forward to the next release!


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks