berkus / muddle

Automatically exported from code.google.com/p/muddle
0 stars 0 forks source link

Does _just_pulled do what we want? #244

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
One way of getting an up to date version is to do:

muddle pull _all
muddle rebuild _just_pulled

Where _just_pulled allows you to know what needs to be rebuilt.

One issue with this is that after pulling twice without building, _just_pulled 
contains only the files that have pulled on the second pull. This makes knowing 
what has been pulled but not built difficult in this situation.

It may be better to change the behaviour such that items are added to 
_just_pulled when they are pulled and removed when they are next built. Then 
_just_pulled will contain a list of all files that need rebuilding to be up to 
date.

It may then be sensible to rename it to something that better explains it's new 
functionality. 

Original issue reported on code.google.com by a.stewar...@gmail.com on 24 Jan 2013 at 3:55

GoogleCodeExporter commented 9 years ago
At the moment, "muddle pull" and "muddle checkout" set _just_pulled. The file 
gets emptied at the start of a "muddle pull", before anything is pulled.

What we *want* to do is something more like:

* "muddle pull" and "muddle checkout" *append* to whatever is in _just_pulled 
(creating it if necessary)

* whenever we *build* a package, we check at the end for the checkouts it uses, 
and if they are mentioned in _just_pulled, we remove them. This needs to be 
relatively atomic (so the amendment of _just_pulled can't leave the file 
broken).

We could determing whether a build has succeeded by inspecting the appropriate 
tag to see if it has been set (because I don't *think* that build_label returns 
anything appropriate to our purpose, and I don't really want to start digging 
in that infrastructure to change it).

The trick is figuring out if this is actually what we want, and which 
operations should remove checkouts from _just_pulled.

Another caveat: maybe we want _just_pulled to retain its current status (the 
checkotus that *were* just pulled, just this moment ago, by the last pull 
command), and we actually want another _xxx quantity, _pulled_not_built (or 
some better name!).
On the other hand, generating too many subtly different variants of this is not 
a good idea. Simple is better than complex.

Original comment by t...@kynesim.co.uk on 18 Apr 2013 at 1:58