Drasil: Add Makefile function to make from master

Created on 6 Jul 2018  路  12Comments  路  Source: JacquesCarette/Drasil

Sometimes, changes from a previous branch are propagated when building master on a local machine. Bumping the version number up and then down fixes this issue (cf. FAQ #2 in SubPackages wiki page). We should add an automatic process to the makefile (perhaps called make master) to bump the version number up, (potentially run make), then down again, and finally run make to remedy this automatically.

There also could be a way simpler solution to this that I'm missing, so I'll wait for approval from @JacquesCarette and/or @szymczdm before implementing.

question

All 12 comments

This does not seem like a solution, but a bit of a hack. I would like more details, hopefully enough to be able to reproduce the issue, so as to better understand what's going on. Then we might be able to design a solution.

I'll describe how it happened to me:

  1. Ran make on glassSRSGrammar branch
  2. git checkout to master
  3. Ran make on master - stable was updated to master's stable, but the code was still building the changes from glassSRSGrammar
  4. Bumped version number in drasil-example (where I made the changes in glassSRSGrammar)
  5. Ran make on master
  6. Build worked as expected and matched stable
  7. Bumped version of drasil-example back down
  8. Ran make
  9. Build still worked!

Notes:

  • By reverting the version number back, no committing was necessary.
  • This is a "local-machine-only" problem. The Travis CI build passed the whole time.

It seems that bumping the version number forced the code to re-compile and realize that it wasn't on the branch anymore. Let me know what more information you need.

I think the problem might be lying in the Makefile - all the packages are built off of drasil-lang, not the next level below it - I'll implement this in a branch and see if you agree.

EDIT: Nope. It's a deeper issue

I believe the issue is probably related to dependencies (in the cabal files) of each of the packages. It is a little hard to explain via text-box though.

Should we meet on Monday then, or should this wait til the Tuesday meeting?

I'm not around for 2 weeks. Ask @szymczdm on Monday, he should be around.

Right - OK

@szymczdm talked and it seems that running make stackArgs=--force-dirty is a good solution for forcing recompiling after changing branches.

Cool - I didn't know about that option!

Running this also allows us to force recompile after a change in a package, so we only need to bump the version number once per change

Related to this, running make stackArgs=--force-dirty doesn't require a version number bump to recompile, so what should the understanding be about version numbers? Bump in every package you've changed with every major pull request? @JacquesCarette @szymczdm

As I said, whenever you change the interface to a package, you should bump up its version number. Otherwise not.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smiths picture smiths  路  12Comments

samm82 picture samm82  路  4Comments

samm82 picture samm82  路  3Comments

bmaclach picture bmaclach  路  13Comments

samm82 picture samm82  路  3Comments