Skip to content

Instantly share code, notes, and snippets.

@tbrosman
Last active November 10, 2019 00:39
Show Gist options
  • Save tbrosman/4d146abf3cb534e28be16646ffc04103 to your computer and use it in GitHub Desktop.
Save tbrosman/4d146abf3cb534e28be16646ffc04103 to your computer and use it in GitHub Desktop.
Dummy Haxe Library C
/.haxelib
/bin

Overview

A repro for an issue in Haxelib where versions on transitive dependencies are always parsed as SemVer. This breaks in the case where you have:

A
B --(git ref)--> A
C --(git ref)--> B

Running

To check out the source:

git clone https://gist.github.com/fa733e78442af62abfb50a9c458677a1.git dummy-haxe-library-a
git clone https://gist.github.com/228302fc7eda9dc0b3f7f3f7d365b8e8.git dummy-haxe-library-b
git clone https://gist.github.com/4d146abf3cb534e28be16646ffc04103.git dummy-haxe-library-c

Then, install locally in a new repo to avoid polluting your system's global haxelib repo:

cd dummy-haxe-library-c
haxelib newrepo
haxelib install ./haxelib.json

Build:

haxe ./build.hxml

Error:

Error: Error: Cannot process [dummy-haxe-library-b]: git:https://gist.github.com/tbrosman/fa733e78442af62abfb50a9c458677a1.git#56ef121dfe88e8b10c2d0f643134927358f6f002 is not a valid version string

Note that the dependency in the error is dummy-haxe-library-a (fa7...) referenced from dummy-haxe-library-b.

-main Main.hx
-lib dummy-haxe-library-b
-hl bin/test.hl
{
"name" : "dummy-haxe-library-c",
"url" : "https://github.com/tbrosman",
"license" : "MIT",
"description" : "Dummy Haxe Library C",
"version" : "0.0.1",
"releasenote" : "",
"contributors" : ["tbrosman"],
"dependencies" : {
"dummy-haxe-library-b" : "git:https://gist.github.com/tbrosman/228302fc7eda9dc0b3f7f3f7d365b8e8.git#cd1f01b7f7f3b89a6a7c5481fdac918dd347a7c0"
}
}
class Main
{
static function main()
{
trace("A");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment