how to properly use haxelib's git feature and .current file

295 views
Skip to first unread message

Chris Anderson

unread,
Jan 5, 2013, 10:48:38 PM1/5/13
to haxe...@googlegroups.com
following the the advice @ http://labe.me/en/blog/posts/2012-12-17-flash-haxe-gaming-sdk.html#.UOjqm2870rX i've hit a snag using haxelib's git feature. 

ex. haxelib git away3d https://github.com/labe-me/haxe-away3d haxelib

not sure the best way to handle the .current file for the git hosted content.  currently i have git as my entry in the related away3d .current file.

i get an error: 
  haxe: Error : [file_contents,C:\Motion-Twin\haxe\lib\away3d/git/haxelib.xml]

i know that the haxelib.xml file is nested @ git/haxelib/haxelib.xml rather than git/haxelib.xml.  is what's the proper value expected in this particular .current file?

appreciate the help

Jason O'Neil

unread,
Jan 5, 2013, 11:25:25 PM1/5/13
to haxe...@googlegroups.com
The git feature is pretty unsophisticated - I'm not sure if it even uses the haxelib.xml file...

Generally I think the way it works when you run the command is:
  • The git repo is cloned into {yourhaxelibfolder}/away3d/git/
  • The equivalent command of "haxelib dev away3d {yourhaxelibfolder}/away3d/git/haxelib/ is run.
    • When this command is run, the text value of the ".current" file is set to the word "dev"
    • If you run 'haxelib list', the version of AS3 that is selected (in brackets) should be "dev", with a path to the git folder.
  • Any dependencies described in "haxelib.xml" will be ignored... you will have to include them yourself in your hxml file.

Given this, a few things that might help you figure out the problem:

  • Check that you have write-permission for the haxelib folder.  On Linux I get a similar error message if I don't run haxelib as root/administrator.
  • The Away3D repository appears to use submodules, which haxelib probably doesn't initialise.  Try following their second set of instructions in the README, which has `git submodule init` etc.
  • If the install is successful but the project won't compile, check if Away3D has any dependencies you need to include in your hxml build file.

Hope this helps

If not, maybe one of the maintainers of the haxe-away3d Github repo can help you...

Jason



Simon Krajewski

unread,
Jan 6, 2013, 3:54:41 AM1/6/13
to haxe...@googlegroups.com
Am 06.01.2013 05:25, schrieb Jason O'Neil:
The git feature is pretty unsophisticated - I'm not sure if it even uses the haxelib.xml file...

The main purpose of the command is to use repositories that do not have a haxelib.xml file. The assumption is that if they have such a file, one might as well use a normal haxelib version of the lib.

However, we would accept a patch to haxelib which handles this file, if present.

Simon

Marc Weber

unread,
Jan 6, 2013, 4:56:54 AM1/6/13
to haxelang
I didn't knew about the git feature.
Is there also a way to register git urls at lib.haxe.org now

Marc Weber
Reply all
Reply to author
Forward
0 new messages