buildinspace / peru

a generic package manager, for including other people's code in your projects
MIT License
1.11k stars 69 forks source link

Peru does not see changes when rev is a branch #245

Open jankap opened 1 year ago

jankap commented 1 year ago

Suppose I'm using a git module with ref: main, i.e. a branch information. When I push changes to that branch and run peru sync, the changes are not pulled, only after peru reup, but that updates my other (hard coded) revs, too, which is something I'd like to avoid.

Is that intended?

Thanks

oconnor663 commented 1 year ago

Try peru sync --no-cache.

jankap commented 1 year ago

I'd like to use the cache, but your suggestion makes sense.

However, I came up with a different solution:

imports:
    track-main: lib/tracking-main
    track-rev: lib/tracking-rev

git module track-main:
    url: https://....git
    rev: 72a6daa4a3efd3d654565b69c59b4700c2d020fa # this is the current main branch rev after reup
    reup: main
    # track the main branch

git module track-rev:
    url: https://....git
    rev: 72a6daa4a3efd3d654565b69c59b4700c2d020fa
    reup: 72a6daa4a3efd3d654
    # track only a revision that remains after reup

Is this okay to use in such a way? I'd like to "pin" some versions to a rev, even during reup.