Skip to content

Lock to node 10 - #688

Merged
sirreal merged 4 commits into
developfrom
update/lock-node-10
Oct 28, 2019
Merged

sirreal merged 4 commits into
developfrom
update/lock-node-10

Conversation

@sirreal

@sirreal sirreal commented Oct 25, 2019

Copy link
Copy Markdown
Member

This PR does 2 things:

  • Replace wp-calypso .nvmrc symlink with an .nvmrc file referencing the current wp-calypso Node v10 version.
  • Make the Node desktop/calypso version mismatch error a warning (don't fail the build)

This should allow to for wp-desktop to run on node v10 while wp-calypso moves ahead.

When wp-desktop is ready to move to Node v12 (and #686 is fixed), this PR can simply be reverted.

This should allow wp-calypso to move ahead with Automattic/wp-calypso#37031

@sirreal sirreal changed the title Update/lock node 10 Lock to node 10 Oct 25, 2019
@sirreal sirreal mentioned this pull request Oct 25, 2019
2 tasks done
@sirreal

sirreal commented Oct 25, 2019

Copy link
Copy Markdown
Member Author

This branch is passing with Node 12: https://circleci.com/gh/Automattic/wp-desktop/47765

@sirreal

sirreal commented Oct 28, 2019

Copy link
Copy Markdown
Member Author

I'd appreciate if folks could prioritize this review, it's the only known blocker for Automattic/wp-calypso#37031.

cc: @nsakaimbo @loremattei

@nsakaimbo

nsakaimbo commented Oct 28, 2019 •

Copy link
Copy Markdown
Contributor

This should allow to for wp-desktop to run on node v10 while wp-calypso moves ahead.

To clarify, wp-desktop is currently pinned to Node v7.9.0 (Electron v1.7.x), not Node v10. Unless I'm missing something about the build process or the proposed changes? Ref: Electron and Node Compatibility. I believe the compatibility check ensures that the correct version of Node is set by nvm for the purposes of building Calypso - technically, this isn't necessarily the version of Node used from within the Electron application.

Make the Node desktop/calypso version mismatch error a warning (don't fail the build)

Is the goal here to build Calypso using Node v12 as part of the wp-desktop build process, while maintaining the Electron v1.7.x (and effectively Node v7.9.0 at runtime)?

AFAIK, once built, the Calypso server is booted directly from within the Electron application. Electron v1.7.x is actually running a fork of Node v7.9.0, so as long as the Calypso server doesn't expect Node v12 at runtime, this might be reasonable. I'm not sure about the implications of the potential mismatch, though - this is still somewhat of a gray area for me. (Worth noting that the runtime version of Node within wp-desktop has been pinned to v7.9.0 while Calypso has been compiled on on Node v10.x for a while now - perhaps this may not be a concern.) If we get this to build we would should QA/test thoroughly.

Side note: I'm not sure what the branching protocol is, but should we merge/test these changes in a feature branch before merging directly into develop?

@sirreal

sirreal commented Oct 28, 2019

Copy link
Copy Markdown
Member Author

To clarify, wp-desktop is currently pinned to Node v7.9.0 (Electron v1.7.x), not Node v10.

Thanks, I did not know that.

Is the goal here to build Calypso using Node v12 as part of the wp-desktop build process, while maintaining the Electron v1.7.x (and effectively Node v7.9.0 at runtime)?

The goal is to allow Calypso to move to that latest Node LTS (v12), from the previous LTS (v10) it uses now. In order to allow Calypso to move to v12, we're concerned with the build environment for wp-desktop which seems to have issues building on v12. It sounds like there is already a build/runtime version mismatch (v10 vs. electron/v7) and that would continue to exist until wp-desktop updates.

This change would allow wp-desktop to remain on Node v10 at build time while Calypso moves ahead to Node v12 for its purposes.

This highlights some existing problems in wp-desktop, but I don't think they're reasons not to merge this PR.

@nsakaimbo nsakaimbo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@sirreal
sirreal merged commit 6ab5b3c into develop Oct 28, 2019
@sirreal
sirreal deleted the update/lock-node-10 branch October 28, 2019 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants