Open Gama11 opened 4 years ago
On second thought, supporting relative paths in lix dev
is a nice feature since it allows you to commit the dependency HXML. So it would be preferable if the path was resolved against the correct directory.
Hm, are you sure this works now? I get the following hxml for npx lix dev test-adapter test-adapter
with lix 15.9.0:
-lib json2object
-cp test-adapter
-D test-adapter=1.2.8
${SCOPE_DIR}/test-adapter/extraParams.hxml
--macro Sys.println("haxe_libraries/test-adapter.hxml:3: [Warning] Using dev version of library test-adapter")
Which again leads to classpath test-adapter is not a directory or cannot be read from
on CI.
I guess it would have to be -cp ${SCOPE_DIR}/test-adapter
, like ${SCOPE_DIR}/test-adapter/extraParams.hxml
?
Will check tomorrow ;)
The behavior of
lix dev
with relative paths seems a bit strange / potentially buggy.Scenario: https://github.com/vshaxe/haxe-test-adapter has a main project / lix scope in the root, and then a few subprojects in
samples/
. It also contains a Haxelib that I've tried installing withlix dev test-adapter test-adapter
.However, if you then
cd
to one of the subprojects and try to build it, you'll get errors since it tries to resolve the relative-cp
against the current working directory, rather than the root directory that contains the scope. So for CI I've had to resort to this hack:https://github.com/vshaxe/haxe-test-adapter/blob/88f71015792cab78696a3ff8c0fed7b26269d892/.github/workflows/main.yml#L28
Not sure if this is an issue with
lix dev
or if I'm doing something I shouldn't. Shouldlix dev
maybe automatically convert all relative paths to absolute ones?