Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with haxelib newrepo #64

Open
kevinresol opened this issue Mar 29, 2017 · 2 comments
Open

Doesn't work with haxelib newrepo #64

kevinresol opened this issue Mar 29, 2017 · 2 comments

Comments

@kevinresol
Copy link
Contributor

Because it list haxelibs from the flow script folder not the project root. So it will the global haxelib instead of the local .haxelib folder.

var has = haxelib.version(flow, name, depend_version);

@ruby0x1
Copy link
Member

ruby0x1 commented Mar 30, 2017

If you can find documentation on the newrepo command I would take a look.

@kevinresol
Copy link
Contributor Author

kevinresol commented Mar 31, 2017

Here it is, but it doesn't tell much.

Basically the command itself does nothing more than creating a .haxelib folder at cwd.

The really interesting part is that when haxelib runs, it will search for .haxelib folder in cwd and, if it exists, use that as the haxelib path. The same applies on the haxe compiler (which uses haxelib to resolve paths I believe).

The tricky part is that the search for .haxelib only happens at cwd and will not "go up" the directory tree.
So if flow runs haxelib-related things not at project root (where my .haxelib folder resides), it will be using the global haxelib path.

You can see how I used this to check-in the haxelib dependencies of an app as submodules. So people doing a git clone --recursive will get the exact version of dependencies: https://github.com/haxe-react/haxe-react-native-sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants