Skip to content
This repository has been archived by the owner on Dec 24, 2018. It is now read-only.

support install with OS_ARCH #41

Merged
merged 5 commits into from
Feb 14, 2015
Merged

Conversation

fengmk2
Copy link
Contributor

@fengmk2 fengmk2 commented Feb 13, 2015

Fixes #40

@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 13, 2015

/cc @am11

@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 13, 2015

I test work both on x86 and x64.
image

@am11
Copy link

am11 commented Feb 13, 2015

@fengmk2, thanks 👍
I am testing your fork now. Will give you feedback shortly. :)

@am11
Copy link

am11 commented Feb 13, 2015

@fengmk2, I tested as follow:

nvmw install v0.10.32 x86
:: after it says 'Now using node v0.10.32'
node -v
:: returns v0.10.32
node -p process.arch
:: returns x64

Also getting the same result with nvmw install v0.10.32 ia32.

Expected behaviour:

nvmw install v0.10.32 x86  :: and / or ia32
:: should say 'Now using node v0.10.32-x86' (and / or v0.10.32-ia32)
node -v
:: v0.10.32
node -p process.arch
:: should return ia32

@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 13, 2015

fix x86 on fengmk2@6fb3002

@am11
Copy link

am11 commented Feb 13, 2015

@fengmk2, thank you! It now downloads ia32 binaries with either of those switches. Also tested with iojs! 👍

Would it be possible to make both architectures of same version co-exits? Meaning it always create a folder with arch slug: .nvmw\v0.10.33-x64 and .nvmw\v0.10.33-ia32 (and the message on nvm use should say Now using node v0.10.33-ia32 or -x64). Currently it overwrites the existing folder regardless of the fact the existing and the one being installed differ in architecture.

IMO, even if you are re-downloading the existing {version}-{arch} it should error: already exists, please uninstall {this version} before reinstalling to overwrite.

@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 13, 2015

Install both x32 and x64 at some time is too complex.
The most common, I think people using only one arch.

@am11
Copy link

am11 commented Feb 13, 2015

In our use-case for example: sass/node-sass#655, where we are building binaries for a matrix covering various runtimes are architectures, it is required to have both architectures. Having both architectures simultaneously will prevent us from reinstalling the same version again.

@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 13, 2015

@am11 OK, let's change to this:

  • if given arch not equal to system default arch, save node to v0.10.33-$custom-arch
  • if given arch equal to system default arch, save node to v0.10.33

This change can be keep compatible.

    $ nvmw install 0.12.0 x64
    $ nvmw install 0.12.0 x86
@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 13, 2015

@am11 done

@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 13, 2015

@am11 you can take a try to pre build binary using https://github.com/mapbox/node-pre-gyp

@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 13, 2015

image

@am11
Copy link

am11 commented Feb 13, 2015

@fengmk2, I can confirm that it is fixed! Thank you! 👍 🎉

(would be nice if you could update the README in the same PR) 😎

Also thanks for the node-pre-gyp tip. We already have that planned for quite sometime: sass/node-sass#56. We are struggling with Linux binaries which requires a lot of extra work to support older versions of CentOS (see sass/node-sass#517 and sass/node-sass#602). Hence automated build is not a very smooth option to implement for now.

@fengmk2
Copy link
Contributor Author

fengmk2 commented Feb 14, 2015

@am11 add.

@hakobera can review and merge now.

@hakobera
Copy link
Owner

@fengmk2 Wow, you did great work again and again! 👍

hakobera added a commit that referenced this pull request Feb 14, 2015
support install with OS_ARCH
@hakobera hakobera merged commit 7d46af9 into hakobera:master Feb 14, 2015
@fengmk2 fengmk2 deleted the support-arch branch February 14, 2015 13:53
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.

Various architectures cannot coexist
3 participants