Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Fix neon build when run without arguments #56

Closed
wants to merge 1 commit into from

Conversation

vmx
Copy link

@vmx vmx commented May 3, 2017

neon build did no longer build the module from the native sub-directory
automatically. This breaking change was introduced in version 0.1.14 with
commit 42726bd 1.

The problem is the ternary operator. It doesn't evaluate as expected. An
empty array evaluate as true (same as for an if statement):

> [] ? true : false;
true

Therefore an empty list of modules evaluated to true and the code tried
to resolve their paths, which lead again to an empty array, which lead
to not building anything at all.

The fix is to check for the length of the array.

`neon build` did no longer build the module from the `native` sub-directory
automatically. This breaking change was introduced in version 0.1.14 with
commit 42726bd [1].

The problem is the ternary operator. It doesn't evaluate as expected. An
empty array evaluate as `true` (same as for an `if` statement):

    > [] ? true : false;
    true

Therefore an empty list of modules evaluated to `true` and the code tried
to resolve their paths, which lead again to an empty array, which lead
to not building anything at all.

The fix is to check for the length of the array.

[1]: neon-bindings@42726bd#diff-d9d9214113dea1c364abd4ba3c70be11R141
@dherman
Copy link
Collaborator

dherman commented May 3, 2017

Ha! I overlooked your PR and already landed 788ac1a last night. But thanks so much for the PR!

@dherman dherman closed this May 3, 2017
@vmx
Copy link
Author

vmx commented May 4, 2017

Wouldn't it make sense to make a new bugfix release? Without this change all applications that have a version like ^0.1.13 set won't build.

@dherman
Copy link
Collaborator

dherman commented May 6, 2017

Yes, sorry! Pushing a build asap…

@dherman
Copy link
Collaborator

dherman commented May 6, 2017

OK, published 0.1.16!

@vmx vmx deleted the fix-neon-build branch May 6, 2017 17:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants