avn icon indicating copy to clipboard operation
avn copied to clipboard

Abort if current and target Node versions are the same (closes #78)

Open alexilyaev opened this issue 4 years ago • 2 comments

I'm trying to handle #78.

The implementation is very simple and probably doesn't cover edge cases.
But it works for me.
I'd be glad to expand upon this, but first wanted to get some traction going.

Also, some tests are failing, not sure how to fix that.
Maybe move the solution to the Node.js side.
I did in Bash thinking it would be much faster.

alexilyaev avatar Aug 27 '19 14:08 alexilyaev

@wbyoung Hope you're still active here.

alexilyaev avatar Aug 27 '19 14:08 alexilyaev

I understand the point of wanting to optimize this, but I'm reluctant to make this change for a few reasons:

  1. The process of activating a version of node could change something besides just simply the version number (I thought I left this comment somewhere before, like on #78, but guess I forgot when that was first opened). For instance, it could change things about which global npm modules are available (similar to RVM gemsets).
  2. The file may not be just plain text and may not stay that way in the future (see #10).
  3. This doesn't seem to be the right solution to solving a performance problem. The performance problem should be addressed rather than adding completely to this system.
  4. Shell support & fragility is being increased by adding this complexity. One motivation of the current design is to keep as much as possible written in Node to avoid shell specific issues.

If we can resolve these concerns, then I think this is a go. But I'm skeptical at this point.

Also, I honestly don't use this project any more. I've tried to find time to finalize converting it to Babel & more modern JS, but haven't even completed that. So if you're interested in contributing, someone helping tackle and maintain complexity could help push things like this forward.

wbyoung avatar Aug 28 '19 21:08 wbyoung