Skip to content
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

Remove node version check #1201

Merged
2 commits merged into from Sep 22, 2015
Merged

Conversation

adrian-castravete
Copy link
Contributor

Fix an error where the version check of node is only applied to the minor number.
Since node is now at 4.1.0 the check for the minor version being greated than 8 fails.

@adrian-castravete adrian-castravete force-pushed the adrian/node-fix branch 7 times, most recently from c36b374 to 2746f28 Compare September 19, 2015 11:59
@ghost
Copy link

ghost commented Sep 19, 2015

This is just patching the wrong proprietary solution. The right way would probably be to use https://github.com/npm/node-semver and ask it to check if it passes >=0.8.0 (or, actually, rather >=0.10.0, as amber is not supporting 0.8 any more.

And maybe, even better, just package.json of amber-cli should contain proper engines (like >=0.10.0 <1.0.0 || >=4.0.0 and the code that checks the version should be removed altogether.

@adrian-castravete
Copy link
Contributor Author

Oh so it's a little more complicated than expected... :( I'm not really that knowledgeable in versioning solutions... Until then it may be uninstallable on newer nodes... :/

@ghost
Copy link

ghost commented Sep 20, 2015

Maybe it only looks "complicated" because I proposed the long defensive version string - to allow old node, skip intermediate io.js stage (just for the case, so we do not need to support strange edge cases) and allow the new merged node. Otherwise, plain >=0.10.0 would suffice.

Back then, amber command did not have its own npm package, as it has now, so the version checking code is probably from that old times.

I would say the version check code should be simply removed, and left to npm "engines" field in package.json, which s checked during installation (no need to check at runtime).

Adrian Castravete wrote:

Oh so it's a little more complicated than expected... :( I'm not
really that knowledgeable in versioning solutions... Until then it may
be uninstallable on newer nodes... :/


Reply to this email directly or view it on GitHub
#1201 (comment).

@adrian-castravete
Copy link
Contributor Author

I agree with that! 👍 Let's remove version checking. 😸

@adrian-castravete adrian-castravete changed the title Fix node version check Remove node version check Sep 20, 2015
@ghost
Copy link

ghost commented Sep 20, 2015

Pls also change (or add, if not present) the engines in package.json, so that it only allows certain node versions. For example: 0.10.x || 0.12.x || 4.x

Also change versions in `package.json` to match the node versions on which amber inits and serves correctly.
@adrian-castravete
Copy link
Contributor Author

Hello @Herby ! I added the version limitations and removed the version check code.
It works. Running the npm install -g --engine-strict doesn't let me install amber on node 4.1.
I didn't put version 4 in there because of this issue.

@ghost
Copy link

ghost commented Sep 22, 2015

I'll wait with merging until 4.x is there as well.

@adrian-castravete
Copy link
Contributor Author

OK. I closed the issue. Here's the modified code. The versions now allow for anything between 0.10 and 0.13 (exclussively) and anything over 4.0. :)

It was awesome seeing it create the amber environment 😸

Fix a bug in **boot.js** in `readJSObject` where the *nullness* of the js wasn't treated.
Also fix tiny mistake in `package.json`
ghost pushed a commit that referenced this pull request Sep 22, 2015
Remove node version check, small fix in kernel.
@ghost ghost merged commit ce9ce70 into amber-smalltalk:master Sep 22, 2015
@ghost
Copy link

ghost commented Sep 22, 2015

BTW you updated wrong package.json; the one you changed is for amber, not amber-cli. Never mind, I will updated that one.

@ghost
Copy link

ghost commented Sep 22, 2015

Ah, sorry. You updated both. Taking it back.

@adrian-castravete
Copy link
Contributor Author

No probs! 😆 Yeah, I saw they were both and updated. 😄
Glad I could help! :octocat:

@ghost
Copy link

ghost commented Sep 22, 2015

;-) If you want to help more, there are lots of issues out there. There are even ones labeled "entry level" for those who want to help but are not yet immersed enough.

@adrian-castravete
Copy link
Contributor Author

Yes, I will look into it. Although it will mostly be in free time. 😃 Love the project and want to see it move forwards.

@ghost
Copy link

ghost commented Sep 22, 2015

BTW if you happen to test that amber-cli now actually works in node 4, let me know, so I can make a new release of it.

@adrian-castravete
Copy link
Contributor Author

Yeah, I tested it on an empty directory. It created everything without a problem. The only weird thing I noticed was some (probably CSS related) issues with displaying the rename protocol window in the Helios IDE. Otherwise everything works OK and everything gets saved as it should.

@ghost
Copy link

ghost commented Sep 22, 2015

Helios was moved to bootstrap3 and there are still some visual issues. It is not related.

Thanks, going to release.

Adrian Castravete wrote:

Yeah, I tested it on an empty directory. It created everything without
a problem. The only weird thing I noticed was some (probably CSS
related) issues with displaying the rename protocol window in the
Helios IDE. Otherwise everything works OK and everything gets saved as
it should.


Reply to this email directly or view it on GitHub
#1201 (comment).

@adrian-castravete adrian-castravete deleted the adrian/node-fix branch October 18, 2015 20:02
@ghost ghost added this to the 0.15.0 milestone Jan 1, 2016
@ghost ghost modified the milestones: 0.15.0, 1.0 Jan 30, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant