ndmitchell / rattle

Forward build system with speculation and caching
Other
102 stars 5 forks source link

issue related to withCmdOptions and subsequent rattle runs #8

Closed spall closed 5 years ago

spall commented 5 years ago

There is an issue with using 'withCmdOptions [Cwd dir] $ do cmd 1; cmd2; ...' in a build, and then calling rattle again on the same build. During subsequent runs cmd's will not execute in the 'dir' directory.

In this branch: https://github.com/spall/rattle/tree/cmd_options_issue I added some code to show what I thought would be a possible fix and then a test which shows the problem with this fix. Two commands which are the same are now viewed as different commands; because the files were moved to a new directory.

I'm not sure what the best solution is to this problem.

Edit: On second thought maybe the commands being viewed as different is the correct behavior, but I was expecting different behavior since the old commands are "outdated" in a sense.

ndmitchell commented 5 years ago

Thanks for the report! I just pushed a quick patch I think might fix it. Can you test? (Otherwise I'll take a look tomorrow)

ndmitchell commented 5 years ago

I merged your patch from #9 which fixes this.