Skip to content

Doesn't work with haxelib newrepo #64

Open

Description

@kevinresol

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);

Activity

  1. ruby0x1 commented on Mar 30, 2017

    @ruby0x1
    Member

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

  2. kevinresol commented on Mar 31, 2017

    @kevinresol
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions