-
Notifications
You must be signed in to change notification settings - Fork 14
Description
It seems Voom can't see merge commits. If I lein voom freshen with a merge commit as the :sha I get the error No matching version found for: deplib/deplib {:allow-snaps false, :freshen true, :repo "../deplib", :sha "thesha"}
Minimal example:
git init deplib
cd deplib
echo '(defproject deplib "0.1.0")' > project.clj
git add project.clj && git commit -m "init"
git checkout -b feature-branch
touch fileb && git add fileb && git commit -m "add fileb"
deplib_yep=`git rev-parse feature-branch`
git checkout master
git merge feature-branch --no-ff -m "merge feature-branch"
deplib_nope=`git rev-parse master`
cd ..
mkdir mainproj
cd mainproj
echo "(defproject mainproj \"0.1.0\" :dependencies [^{:voom {:repo \"../deplib\" :sha \"$deplib_yep\"}} [deplib \"0.1.0\"]])" > project.clj
lein voom freshen # Works as expected
echo "(defproject mainproj \"0.1.0\" :dependencies [^{:voom {:repo \"../deplib\" :sha \"$deplib_nope\"}} [deplib \"0.1.0\"]])" > project.clj
lein voom freshen # No matching version found for: deplib/deplib {:allow-snaps false, :freshen true, :repo "../deplib", :sha "thesha"}I can "fix" the issue by tweaking the file-path-merges function (see pin-to-merge-commits). AFAICT the way it currently is written it causes merge commits to have no files in the r-commit-path relation and consequently merge commits don't show up in the candidates-a query (though there is probably a reason it is this way). I also need to adjust the sha verification function to not skip past the merge commit sha.
There could be a reason Voom doesn't work w/ merge commits; just thought I'd open an issue as I found it a bit unexpected.