-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Local repositories and subdirectories #292
Comments
I've raised the issue with Nicolas when he authored the functionality, but we didn't really agree on a satisfactory solution then and decided to leave it at that. Recursing up seems only logical, building on the status quo. The thing is that the cost of recursing up from the cwd will affect everyone, even those not using |
I think that depends on whether we want to encourage use of local repositories, like node/npm does. However right now, most common use is just a global repository, so it'll be an unnecessary overhead. We should indeed measure if it's significant or not. |
As I regularly point out, module resolution is not a feature of npm but of Also, to further go into the differences between Haxe and node, |
If haxe used something like Would be similar, instead of installing libs where haxe expect them, you would give it the information the way haxe expects it. Pro: The package manager is free to do anything as long as |
I ran into an issue with this recently while using hxcpp, and I thought it might be an error with hxcpp. I opened an issue there (link), and @hughsando informed me that this was a limitation of haxelib. There definitely should be some way for child directories to be able to use local repositories from parent directories. Maybe a flag to indicate a local repository should be used? Another possibility is to be able to specify exactly the repository you want to use. |
For the hxcpp issue, I might simply be able to run haxelib from the current directory and specify a full path to the hxcpp generated build.xml file. I will have to look into this. |
Hello, This issue is personally the main reason I didn't switch to local haxelib repositories yet. Looking to parent directories is a very convenient feature of node modules resolutions and it would be great if haxelib did the same. I am reading that it might cause a performance hit to check every parent subfolders, but is that really a concern? I would expect that any modern file system is able to check the existence of Is there another reason that stop us from making this change? |
I think that everyone who cares about local/reproducible setups have moved to Lix nowadays :) |
I do care about local/reproducible builds, and it is probably not very constructive to point to a third party tool instead of addressing the problem at the source. Lix is great, but AFAIK also relies on haxeshim with custom haxe/haxelib commands and their load of complexity, while fixing this I do hope solving this issue will be considered because that really is the last step to make The main problem I am hitting with current behaviour is that I can't run a command ( |
I'm fine with haxelib looking recursively for I agree that while Lix offers additional features, it's not the standard that comes directly with Haxe, so we either need to move our whole toolchain by default to another package manager or keep improving haxelib. |
That was fast! Thanks a lot 🙏 |
…nt_b1fb4af.tar.gz Original link: https://build.haxe.org/builds/haxe/mac/haxe_2019-09-16_development_b1fb4af.tar.gz Note: a few days more recent than haxe 4.0.0-rc.5 ; First build that got a fix for haxelib local repository resolution (see HaxeFoundation/haxelib#292)
Current README states one issue with local repositories (AKA
newrepo
), so I thought it would be fair to create a proper issue :)That means we should look for
.haxelib
directory not only in CWD but also in all its parents, right? This is fairly easy to implement, one thing I'm not sure about is performance implications. But I guess if it works for Git, it should be okay.Is there any other issues with this?
ping @ncannasse and @back2dos as the original authors of the functionality and README note
The text was updated successfully, but these errors were encountered: