Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
fponticelli committed Dec 26, 2017
1 parent 1576c4d commit b276278
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions haxelib.json
Expand Up @@ -5,7 +5,7 @@
"classPath": "src",
"tags": ["thx", "general", "cross", "std"],
"description": "General purpose library. It contains extensions to many of the types contained in the standard library as well as new complementary types.",
"releasenote": "Update doc.",
"version": "0.42.1",
"releasenote": "`Do` notation, and more.",
"version": "0.43.0",
"contributors": ["fponticelli", "andywhite37", "mlms13"]
}
2 changes: 1 addition & 1 deletion src/thx/Objects.hx
Expand Up @@ -468,7 +468,7 @@ Create a copy of the object with the field `field` replaced by `value`.
#if macro
static function buildFromAnonymous(matchField, fields, value, pos) {
var found = false;
var e = haxe.macro.Expr.ExprDef.EObjectDecl(fields.map(function(field)#if (haxe_ver >= 4.0) :haxe.macro.Expr.ObjectField #end {
var e = haxe.macro.Expr.ExprDef.EObjectDecl(fields.map(function(field)#if ((haxe_ver >= 4.0) && !macro ) :haxe.macro.Expr.ObjectField #end {

This comment has been minimized.

Copy link
@kLabz

kLabz Jan 13, 2018

Why?
This breaks haxe 4 compatibility (the whole #if ... #end does nothing any more since we are already in an #if macro and you are testing against !macro).
This line would need to be reverted for thx.core to work with haxe 4, does something break (with haxe < 4?) without this change?

This comment has been minimized.

Copy link
@fponticelli

fponticelli Jan 13, 2018

Author Owner

Before deploying the latest release I ran the tests and this line was not working with haxe 4 (lasest dev at the time). If you have a solution that works for latest v.3, v.4 RC and v.4 dev, I will be happy to apply it and release again.

This comment has been minimized.

Copy link
@kLabz

kLabz Jan 13, 2018

Strange, I tested earlier today with v4 RC2 and v4 dev, and it only worked with #if (haxe_ver >= 4.0) :haxe.macro.Expr.ObjectField #end. I'll try to do some more tests tomorrow.

This comment has been minimized.

Copy link
@AdrianV

AdrianV Jan 18, 2018

Contributor

@fponticelli on which haxe 4.0 build did you test ? I can't compile your version with latest haxe @ b22bfd1f9

This comment has been minimized.

Copy link
@kLabz

kLabz Aug 22, 2018

@fponticelli this is still breaking things with latest haxe (4.0.0-preview.4 and dev). This makes libs like thx.color unusable with latest haxe versions, and this "fix" just doesn't make any sense (it's exactly like removing the whole haxe 4 fix, so no wonder haxe 4 doesn't work any more).

Can't really test things in haxe < 4 since tests are using short lambdas, but this should have no impact on haxe < 4 since it does nothing unless haxe version is 4+.

Tests more or less pass on haxe 4 preview 3 (BigInt fails, I'm not sure what the latests PR did and if it caused that). On both haxe 4 preview 4 and latest dev (fdb96bc), tests do not compile due to errors in src.thx.Time and TestBigInt (again, may be related to the merged PRs). But this line (reverted) works.

Reverting this change should work with v.3 (no changes), v.4 preview 4 and v.4 dev (both broken atm because of this fix).

var fieldName = field.name;
if(fieldName == matchField) {
found = true;
Expand Down
2 changes: 1 addition & 1 deletion src/thx/fp/ktree/Zipper.hx
Expand Up @@ -147,7 +147,7 @@ import thx.fp.KTree;
}
public function selectChild(new_head:KTree<T>):Zipper<T>{
return switch(this){
case Cons(head,tail) : Cons(new_head,tail);
case Cons(head,t) : Cons(new_head,t);
default : Cons(new_head,List.empty());
}
}
Expand Down

0 comments on commit b276278

Please sign in to comment.