-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avoid version problems for node users #45
Comments
What is the current state?
…On Wed, 4 Oct 2017 at 2:23 Alex Eagle ***@***.***> wrote:
There are two ways:
1.
recommend PATH=./node_modules/.bin:$PATH so that if you are in a
project directory where ***@***.*** is installed, you get that
version. @vsavkin <https://github.com/vsavkin> suggests this. But if
you're in a child directory (common for bazel users since it does a good
job in this case) it doesn't work
2.
when ibazel runs, it checks if there is a locally installed copy, and
exec()s that one instead. gulp and angular-cli do it this way. @hansl
<https://github.com/hansl> suggests this
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#45>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ABUIFzWl27rpaWcyehP3VScAkB_RW3Ixks5sosHngaJpZM4Ps6Eq>
.
|
Currently you either do a global install, then get the global version anywhere you run the tool, or list ibazel in your package.json#devDependencies, then you have to run it like |
got it. thanks
…On Wed, Oct 4, 2017 at 3:53 PM Alex Eagle ***@***.***> wrote:
Currently you either do a global install, then get the global version
anywhere you run the tool, or list ibazel in your
package.json#devDependencies, then you have to run it like
./node_modules/.bin/ibazel
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIFzQsVEhzUS8Fya8aKoDLc6FITHmIks5so3_QgaJpZM4Ps6Eq>
.
|
I think this issue is a bit tricky since you can specify multiple targets for bazel to build/run bazel build :some_target path:some_other_target Should we only try to pick the local ibazel if they specify one target? Or maybe only if they are in a subdirectory with a local bazel installation (so running ibazel from outside the project directory would do use the global installed version)? I think we need to think about a really easy to understand heuristic we can use so that we can communicate that to ibazel users |
I don't think it matters what the target patterns are. |
So basically we punt on if they have a local installation but invoke ibazel
from a parent directory of their project. I think that's pretty reasonable.
…On Wed, Nov 15, 2017, 4:29 PM Alex Eagle ***@***.***> wrote:
I don't think it matters what the target patterns are.
You just look in the cwd() where the ibazel is run. If you find a locally
installed in ./node_modules or ../(../)+node_modules then you use that
(following node module resolution semantics). Finally you give up and run
the globally installed one.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHteO7c4Vwhl6gy5sD4JMYVukO6Vi92Eks5s23PVgaJpZM4Ps6Eq>
.
|
Is there a good way to scan for |
That's what other implementations do, I believe
…On Wed, Nov 15, 2017, 6:03 PM Andrew Z Allen ***@***.***> wrote:
Is there a good way to scan for node_modules directories other than to
recurse up and see if it exists?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC5I512YxTo0PUZVPYZSMzkAzR5n4Vzks5s25gOgaJpZM4Ps6Eq>
.
|
There are two ways:
recommend
PATH=./node_modules/.bin:$PATH
so that if you are in a project directory where [email protected] is installed, you get that version. @vsavkin suggests this. But if you're in a child directory (common for bazel users since it does a good job in this case) it doesn't workwhen ibazel runs, it checks if there is a locally installed copy, and exec()s that one instead. gulp and angular-cli do it this way. @hansl suggests this
The text was updated successfully, but these errors were encountered: