Closed Type1J closed 9 years ago
When you add a haxelib to a "haxelib.json" dependency, there's a host of annoying behaviors that begin to trigger. Perhaps for "openfl-samples" it's more reasonable, but for OpenFL and Lime it's been trouble.
First, it imports the other library automatically. In OpenFL's conditional per-platform world, this was constant trouble.
Second, it's a nuisance when upgrading projects. If you use a development directory for any project, Haxelib still tries to download and install the release version. In addition, it asks each time whether it should "set the library version to 1.0.0?" or whatever the release version is. If you have inter-connected dependencies, it will ask this every time, perhaps 10 times for the same library, if you had enough haxelib dependencies.
This is one of the reasons why OpenFL and Lime have a separate mechanism for installing dependencies. Perhaps the "include.xml" should include some of these libraries, so that "openfl install openfl-samples" includes these. That would also make them installed during "openfl setup"
Sorry for the long answer, open to one of the above scenarios, or keeping with our current approach, depending on what feels best
I'm not entirely sure of the scope of what "layout" does, but instead of what you described above, would it be bloat to include it in the "swf" library? It wouldn't be included in the output if it wasn't used, so unless you see a problem, that's probably the best way to get around the behaviors of haxelib that you described above, since it's already included with "openfl setup".
Okay, I've just added it here:
https://github.com/openfl/openfl-samples/commit/178fc02
Now when you haxelib run openfl setup
it should also include the Box2D and layout libraries, in addition to SWF and Actuate.
When you openfl upgrade openfl-samples
it will also make sure that these are up-to-date, whether they are installed through haxelib, or whether you use haxelib dev
to a custom development directory :wink:
Thanks for bringing this up, I think having "batteries included" is better than people being thrown (too soon) about missing libraries
The "layout" library is used in "SimpleSWFLayout", but is not included in haxelib.json as a dependency.