-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
src: add no-op for --harmony-proxies flag #8395
Conversation
The upgrade from V8 5.0 to V8 5.1 removed the --harmony-proxies flag. This restores them as no-ops to prevent breakage. Fixes: nodejs#8388
This seems rather ugly. Hasn't this happened before and we just accepted it as V8 ships features? |
@mscdex I would be surprised if we did in a non-major release that was backed by the current stability policies. |
@mscdex I agree. I guess we could add the flag back in the flag-definitions? |
Yeah, not a fan of this approach as it sets a bad precedent -- I don't want to be forced to add a new flag in node.cc every time v8 decides to pull it. |
Hmm, how is someone ever going to notice that they are providing a nonexistant flag if we just noop it? Would it be possible to print a warning instead? |
Maybe we are blowing this out of proportion, though. V8 flags always were unstable, and I'm leaning to just documenting that fact. |
There were quite a few flags removed in v6.5:
|
I know everyone is likely sick of warnings ;-) ... but... one solution would be to no-op these and print a warning at startup when they are used... just to make it visible that they're no longer necessary/useful. |
@addaleax thanks, I didn't realize that. I guess we could add them back to flag definitions (Not sure we would even want to with this many though)? |
If we're going to go down the path of smoothing over V8 changes, wouldn't it be better to float a patch on top of V8 instead of adding them to node core? They are V8 options, not node options. The other option is to back out V8 5.1 out of v6.x. I'm -1 on this in general though. |
Floating a patch on V8 may be easier, since it will take advantage of the options parser. |
+1 to floating a patch on V8. We should likely come up with a policy for updating V8 in a release stream, personally I think that including no-ops for removed flags is a fairly low effort and reasonable thing to offer individuals. Alternatively we can head in the direction that we do not support these flags, but it seems like the amount of work to do is fairly minimal compared to the number of people that will have to potentially make changes on already deployed applications to run with the upgrade. |
I'll update the PR with an attempt at that tomorrow. Thanks! |
Strongly -1. |
Being the author of a framework, it is a nightmare for me to run tests on Travis(or any CI). I have to write Node.js scripts checking the node version and then running tests with dynamic |
@thetutlage You shouldn't have to do this. The |
@targos I agree to that. My framework has support from Node.js 4.0 - Latest version. According to semver switch from But taking a practical example, where frameworks generally don't drop support for older versions quickly, it is kind of pain to write work around. It would have been nice, if Node.js |
I'm -1 on this. In the past we've said that we don't touch the V8 flags (such as turning off the strict mode flag). |
|
Closing due to the number of -1's. I think @ofrobots is going to open one that isn't so ugly. Thanks! :] |
I am not super worried about |
On second thought, I still strongly think we should do this. (Probably on V8, it's not like other stuff wasn't floated.) What is @ofrobots's plan?
That's not the same as your application no longer starting in a minor upgrade, no matter how "easy" the fix. Edit: I have some leeway for experimental flags, similar to async_wrap, but see my comment above. |
Sorry, I didn't know about this thread. Generally I would agree with the argument that V8 flags are not supported by Node and users should not have an expectation of them continuing to work. In the case of the shipping harmony flags (nops) that were removed, it is going to be trivial one liners to add them back in (as nops), specially given that the harmony flags do get some use in the ecosystem. I am strongly against doing anything with any of the other removed flags. |
I would definitely be in favor of making these noops when they disappear from v8 in patch or minor releases, and removing them entirely in majors. I would prefer that a deprecation warning be printed but I'm ok with simply ignoring them. |
I don't understand the discussion point, but IMHO, experimental features like |
That might be a different the question, maybe we don’t need to, yeah. But still, we clearly can do something on our part that comes at relatively little cost (and where there are clearly volunteers) and might save a much much larger group of people quite a bit of work. |
My attempt: #8445 |
Add back the no-op harmony shipping flags that were removed in V8 5.1 to increase compatibility with V8 5.0 that we had been shipping before v6.5.0. These flags do nothing. Fixes: nodejs#8388 Ref: nodejs#8395 PR-URL: nodejs#8445 Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net> Reviewed-By: thealphanerd - Myles Borins <myles.borins@gmail.com> Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: evanlucas - Evan Lucas <evanlucas@me.com> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
src
Description of change
The upgrade from V8 5.0 to V8 5.1 removed the --harmony-proxies flag.
This restores them as no-ops to prevent breakage.
Fixes: #8388