Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting changes in separately located multi-project packages #3000

Closed
metaleap opened this issue Feb 11, 2017 · 2 comments
Closed

Detecting changes in separately located multi-project packages #3000

metaleap opened this issue Feb 11, 2017 · 2 comments

Comments

@metaleap
Copy link

v1.3.2 Win64 build

(Could well be "due to GHC" or "due to Cabal" but hey it's stack I'm using as "my build tool" here ;)

A probably not entirely uncommon scenario: a package project ~/hsdev/mycorelib and an executable project ~/hsdev/myapp. The later imports/includes from the former via build-depends in .cabal plus also via

packages:
  - '.'
  - '../mycorelib'

I make a change in mycorelib, then do a stack install in myapp and voila! All gets completely rebuilt as expected, first mycorelib then all modules in myapp as the log shows (very well as they do all import a module from mycorelib).

Now. Other times --- even more often in practice --- I just make a change in mycorelib and rebuild directly in there (ie. via editor build command to do stack build just as a check for errors). If I then directly do another stack install (aka. stack build --copy-bins) in myapp it just does the well-known no-op (just copies the existing executable) even though in the developer's view the dep sources have clearly totally changed and the binary isn't up-to-date.

In the heat of the moment and especially in "multi-multi-multi-package project" , this kind of behavior is easy to miss and tricky to remember ("oooh I accidentally already built my changes in my one core/shared/common/utils library, better go my half-dozen intermediate libraries rebuilding them so the actual current project picks that up too..") --- currently one would end up having to go through all such packages rebuilding them whenever this particular failure-to-auto-propagage-changes materializes.

Unless I'm missing something? Seems like an "intuitively easy feature-turned-bug", as in "it checks the mylibcore is up to date (well its build outputs are, alright), then it checks the myapp is up to date, ah well nothing to do" --- except with mylibcore binaries / objects newer than myapp binaries / outputs, that's certainly not the case.

Or was I supposed to manually increment the mylibcore version number all the time as I'm aiming to get into the flow of heavy fast-paced iteration? ;)

@mgsloan
Copy link
Contributor

mgsloan commented Feb 11, 2017

Thanks for reporting the issue! I believe this is a duplicate of #2904 . I agree that this really ought to get fixed!

@metaleap
Copy link
Author

Indeed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants