fponticelli / thx.color

General purpose color library for Haxe
http://thx-lib.org
MIT License
38 stars 4 forks source link

Don't forbid the previous versions of the dependencies please. #26

Closed boozook closed 9 years ago

boozook commented 9 years ago

Why and for what you add -lib thx.core in extraParams.hxml?

This will give problems when I use a specific version of the library. E.g. if I specified the library version in the .hxml: -lib thx.core 0.37.0.

In this case in the resulting concatenated .hxml we will get:

-lib thx.core:0.37.0
-lib thx.core

And if we have latest actual version in Haxelib (0.37.1) => compiler's exception:

Library thx.core has two version included 0.37.1 and 0.37.0
Compilation failed

You already mention it in haxelib.json and it is all you need :ok_hand:

fponticelli commented 9 years ago

I am fought over this. If I remove it you have the benefits you describe, if I don't you just don't have to put it in your hxml and it works. What annoys me is that if -lib thx.core is in neither places, the compiler error is very generic, like type not found thx.Arrays and a new user might not know what library to add to fix the issue.

boozook commented 9 years ago

Franco, it's very strange. Compiler (via Haxelib) looking dependencies in haxelib.json and you can test it:

$ haxelib path thx.color
# extraParams starts here
# I comented it all :)
#-D thx_color
#-lib thx.core
# extraParams endss here
/Users/ak/Developer/Haxe/Libs/thx,color/0,17,3/src/
-D thx.color=0.17.3
-D thx_core
/Users/ak/Developer/Haxe/Libs/thx,core/0,37,1/src/
-D thx.core=0.37.1

All my projects without your extraParams builds fine and works => dependencies added automatically from haxelib.json => -lib thx.core in extraParams.hxml not needed. Sorry.

I think in your case you need to specify the version number in dependencies in haxelib.json. Sorry for my terrible English.

fponticelli commented 9 years ago

I am not sure I totally understand but it seems like you have spent some time on it so I will trust your judgment ;) extraParams is gone.

boozook commented 8 years ago

Thanks! And sorry for judgment ;)