Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Ticket #34: Builder does not find nodejs, which is already installed. #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ianbrandt
Copy link

  1. Added node.executable and node.path properties, preserving the existing behavior as the default.
  2. Sourced the execution environment so the existing PATH variable could be augmented.

Fixes #34.

@ianbrandt
Copy link
Author

I've tested this on OS X by building both YUI3 and my internal project in Terminal.app and Eclipse.app by way of:

  1. ln -s /opt/local/bin/node ~/nodejs
  2. Invoke Ant with -Dnode.path=/Users/ibrandt -Dnode.executable=nodejs.

In all four scenarios 'nodejs' was in general found and executed. I did hit one issue with YUI3: 'src/loader/build-loader.xml' has it's own <exec executable="node">. If this request is acceptable I can address that issue with another pull request on the YUI3 project that leverages the new properties.

@ianbrandt
Copy link
Author

Dav,

Is commit 9f9f240 along the lines of what you meant, or did you mean an actual custom Task implementation? If the latter did you have somewhere in mind for the Java build infrastructure that would be required?

I have a succeeding YUI3 build that uses the macro ready for commit. I had to move the <node> invocations in a few build files, such as 'src/loader/build-loader.xml', below the import of bootstrap.xml in order to pick up the MacroDef in macrolib.xml. At first I tried to preserve the order of the node exec's and bootstrap imports by explicitly importing macrolib.xml before them both, but I ran into chicken and egg issues with Ant Contrib, properties.xml, and the yuicompress macro.

Any tips on how to verify that the reordering of the node exec in these builds is safe?:

  1. src/loader/build-loader.xml
  2. src/simpleyui/build.xml
  3. src/yui/npm.xml
  4. src/yui/yui-base.xml
  5. src/yui/yui-core.xml

@ianbrandt
Copy link
Author

One other question... For pull requests on yui2 and yui3 that would correspond to this pull request, do I need to file two new tickets? I'm guessing "fixes builder #34" commits on those projects won't link back to the builder ticket.

@ianbrandt
Copy link
Author

For a preview of the related yui3 changes see: ianbrandt/yui3@930e809.

@ianbrandt
Copy link
Author

I've tested this with yui2 using my root build.xml from yui/yui2#12. It looks like no changes are required for yui2, only yui3 per the above.

@ianbrandt
Copy link
Author

I went ahead and made the corresponding yui3 pull request: yui/yui3#199.

@ianbrandt
Copy link
Author

Any updates or feedback on this one? I'm starting to trip over the fact that this hasn't been merged as I work on ticket #51. I'm making subsequent changes that will end up being merge conflicts with this.

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