Open kevinresol opened 4 years ago
Hmm, I don't really know. Initially, lix would not ever update dependencies. People were equally unhappy with that. If anyone is willing to suggest a proper approach to updating dependencies, I'd be happy to implement it. E.g.: what should happen, if you install from haxelib? Should it not update dependencies (from haxelib)?
How about a simple starter: don't touch the dependency hxml if it already exists?
Anyway I just think "not updating dependencies (no change)" is better than "ruining the dependencies (worsen)"...
Yeah, that was the previous behavior, which is pretty decent, because it's quite defensive. But it wasn't really well received. It means that even if we do a round of coconut/tink updates on haxelib, users have to install each lib separately.
For starters, we should have a mode between "flat" and "overwrite all". Whether or "overwrite all" or "add missing" is the default is still open for debate.
Sorry, I just realized that --flat
is not documented, but it is indeed supported for quite a while now. Is that what you're asking for? ^^
It would be nice to have more than one option, to make everyone happy
How about this? :)
or add a setting in haxerc, or lixrc
or lixrc
Yet another file that has to be in the project root? :/
Install just the specified lib and nothing else, even if something is missing (for true experts/perverts/OCD-types who wants to pick everything manually)
Possible via --flat
.
Install just the specified lib and any missing dependencies, but don't overwrite existing libs
Yes, this behavior should be made available again.
Install the specified lib, only modify existing libs if the specified lib provides newer versions (what to do in case of development versions? comparing release/commit dates would be the simplest solution?)
The haxe_libraries do contain version information. We could skip overwriting if the incoming dependency has a lower version. I believe this would make for a good default behavior.
As for commit date, we don't have that information.
Install the specified lib, bringing in exact versions of all the dependencies it specifies (although if it depends on lib A and lib B, both of which depend on different versions of lib C, which version of lib C should be brought in - most recent?)
The basic assumption is that the lib builds correctly, in which case the exact dependency graph is used for transitive dependencies also, leaving no ambiguity and guaranteeing that this particular lib has correct dependencies - this can of course adversely affect other libs in the same build that require a different version of libs A or B or their dependencies.
or add a setting in haxerc, or lixrc
We can allow picking the default via config, but behavior should first and foremost be switchable in an ad-hoc fashion (cli flag, perhaps also via env).
For me, either:
--flat
should be the default, and -r
should force a recursive ("not flat") update. The second one would probably be a big change of behaviour (inoffensive though), but I think it could be nice as well.
Currently, when installed from git, it uses the versions in that lib's
haxe_libraries
folder to install the lib's dependencies. I would really like lix not to do that if that dependency's hxml already exists in the projecthaxe_libraries
folder. Thoughts?