haxelib icon indicating copy to clipboard operation
haxelib copied to clipboard

Haxelib ignores dev-version as existing dependency

Open boozook opened this issue 9 years ago • 2 comments

haxelib  list hxcpp
hxcpp: [git]

haxelib git hxcpp-debugger https://github.com/HaxeFoundation/hxcpp-debugger.git
Installing hxcpp-debugger from https://github.com/HaxeFoundation/hxcpp-debugger.git
Library hxcpp-debugger current version is now git
Installing dependency hxcpp 
Downloading hxcpp-3,3,49.zip...
750515/49476374 (23%)
^C

This should not occur because the any version specified in the haxelib.json and dev/git version is already exists.


Steps to reproduce:

  1. haxelib remove hxcpp remove all hxcpp versions;
  2. haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git install only dev git version;
  3. haxelib git hxcpp-debugger https://github.com/HaxeFoundation/hxcpp-debugger.git install library dependent on hxcpp;
  4. Haxelib will do Installing dependency hxcpp but it's already exists as dev.

boozook avatar Jul 06 '16 13:07 boozook

Strangely it doesn't happen if you replace step 2 with haxelib dev hxcpp ./hxcpp/.

ibilon avatar Jul 06 '16 15:07 ibilon

I think it because wrong behaviour in the checking-existing-version-process:

  1. checkout if dev-version is existing
  2. but there no checking VCS-version, only .dev: see code function getDev( dir ) return File.getContent(dir + "/.dev").trim();

Info about VCS-version (git or hg) stores in the .current file as git or hg - name of subdir.

For fix if we should add there checking "if current is git or hg ⇒ continue".

boozook avatar Jul 09 '16 14:07 boozook