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

Release 1.6 #8728

Merged
merged 435 commits into from Oct 27, 2017
Merged

Release 1.6 #8728

merged 435 commits into from Oct 27, 2017

Conversation

benjamn
Copy link
Contributor

@benjamn benjamn commented May 30, 2017

EDIT: This original post talks about the upgrade to Node 6, but it was decided later on in this thread that Meteor will be upgrading to Node 8 instead. This PR now covers the Node 8 updates.

To test the Meteor 1.6 release-candidate, simply update a project by running:

meteor update --release 1.6-rc.18

Since Meteor 1.4, each release of Meteor has shipped with the latest version of Node 4. However, Node 4 is no longer under "active" long-term support (LTS) and instead falls into the "maintenance" LTS category. Node 6 is now the recommended release for most users. While Node 4 has been perfectly stable for Meteor developers for some time now, it makes sense to keep Meteor up to date.

Meteor 1.6 will be exclusively focused on upgrading the version of Node used by Meteor, along with a few must-have features that depend on Node 6, such as debugging with the --inspect flag in Chrome DevTools, and leveraging native support for new ECMAScript syntax on the server.

Development of features not dependent on Node 6 will continue along the Meteor 1.5.x version line, and those changes will be regularly merged into this pull request. Bugs pertaining to Meteor 1.6 and/or Node 6 should be filed in the Release 1.6 milestone.

This pull request supersedes #6923, where many of the initial problems with Node 6 have already been resolved. Because much of this work has already happened in parallel with Meteor 1.5, and because Meteor has previously survived an even bigger Node upgrade (Node 0.10.x to 4.x), we expect Meteor 1.6 will take significantly less time to ship than Meteor 1.5 did.

As with previous Meteor beta testing cycles, whenever you see a commit added to this pull request with a message like Bump package versions for 1.6-beta.n release., that means you can run meteor update --release 1.6-beta.n to update an existing app to the new version, or meteor create --release 1.6-beta.n your-new-app to create a fresh Meteor 1.6 app.

If you want to participate in the development of Meteor 1.6, you should check out the release-1.6 branch, regenerate the dev bundle, and run the meteor script from a checkout:

cd path/to/meteor
git fetch origin
git checkout -t origin/release-1.6
git submodule update --init --recursive
scripts/generate-dev-bundle.sh
./meteor --help

See these instructions for help with running Meteor from a checkout.


Left to do:

  • Release Meteor 1.5 and merge those changes into this branch.
  • Audit the codebase to catch up with any breaking changes between Node 4 and 5: https://github.com/nodejs/node/wiki/Breaking-changes-between-v4-and-v5
  • Audit the codebase to catch up with any breaking changes between Node 6 and 7: https://github.com/nodejs/node/wiki/Breaking-changes-between-v6-and-v7
  • Audit the codebase to catch up with any breaking changes between Node 7 and 8.
  • Reimplement meteor debug to use Chrome DevTools instead of node-inspector (👋 @brucejo75), which is such a better debugging experience it's not even funny.
  • Get meteor-tool to build on Linux 32bit (runs out of memory currently).
  • Get meteor-tool to build on Windows, and consider adding a 64bit Windows architecture. Note: I think both of these tasks will be easy, but as of right now our Windows build farm doesn't meet the minimum OS requirements of Node 8.
  • Consider removing or reducing the use of Fibers in Meteor's command-line tool, though they certainly still work in Node 8, and we've managed to work around the high CPU problems caused by previous versions of the meteor-promise package (which was the key to getting the tests to pass today). Considered, and postponed until it matters.
  • Eliminate most Babel plugins for server code, except for babel-plugin-transform-es2015-modules-reify.
  • Audit the codebase to catch up with any breaking changes between Node 5 and 6: https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6
  • Upgrade npm to version 5, and teach tools/isobuild/meteor-npm.js to work with package-lock.json files instead of npm-shrinkwrap.json files. Merged.

@benjamn benjamn added this to the Release 1.6 milestone May 30, 2017
@benjamn benjamn self-assigned this May 30, 2017
@benjamn
Copy link
Contributor Author

benjamn commented May 30, 2017

Migrating my to-do list from a comment in the old PR:

moved the list up to the PR description above

I know I'm forgetting important items here, so please feel free to comment with anything else you can think of!

@benjamn benjamn added the in-development We are already working on it label May 30, 2017
@benjamn benjamn mentioned this pull request May 30, 2017
@msand
Copy link
Contributor

msand commented May 30, 2017

Node.js 8 was released a few hours ago, how about landing that and npm v5 at the same time? ;)
It would give the Async Hooks API and upgrade V8 to 5.8 giving TurboFan & Ingnition
https://blog.risingstack.com/important-features-fixes-node-js-version-8/

@msand
Copy link
Contributor

msand commented May 30, 2017

And perhaps more importantly for meteor: N-API, giving a stable Application Binary Interface (ABI) across different Node.js versions.

@fermuch
Copy link

fermuch commented May 30, 2017

Node 8 is supposed to be the next LTS, so it might be good to jump straight to eight if it's not a huge amount of work.

@benjamn
Copy link
Contributor Author

benjamn commented May 31, 2017

I'm not opposed to Node 8, though it was released only just this morning, and in my experience the Node/npm ecosystem can take a while to adjust to a new Node/V8 version. I welcome you to modify NODE_VERSION and try rebuilding the dev bundle yourself, to see what happens!

@vladejs
Copy link

vladejs commented May 31, 2017

Any plans of upgrading the build tool to improve the developer experience regarding frontend development?

I have seen so much people migrating from Meteor to Next.js, which is awesome for building user interfaces in React, thanks to its amazing Hot Module Replacement implementation (HMR) that allows to see code changes instantly. Also it has out of the box SSR support.

I've seen a plugin or so being implemented for Blaze in the forums, but not for React.

My opinion is that most people will prefer first to have those improvements (first class HMR and SSR) than a node upgrade.

Next.js version 3 beta came out a few days ago, and it came with dynamic imports and the ability to create a static version of your app.

I am wondering if using Meteor-Client-bundler on a Next.js v3 app and a Meteor server is the perfect stack to develop my next webapp.

@AndreasGalster
Copy link

Just want to give a quick thumbs up for the overview of this release. You've summarized very well what you're going to do and also how we can figure out when there's a new build, I like it!

@benjamn
Copy link
Contributor Author

benjamn commented May 31, 2017

@vladejs Now that 1.5 is out, one of my next agenda items is to demonstrate how easy SSR + routing + dynamic imports can be with React in a Meteor app, but I don't think this is the right forum to discuss that. I'm sure there will be a Release 1.5.1 pull request before long. Also Next.js is entirely React-specific, whereas Meteor is a general purpose build tool, so I think you're comparing apples to an apple tree, if you get my drift…

@benjamn
Copy link
Contributor Author

benjamn commented May 31, 2017

I tried a Meteor build with Node 8 and npm 5 just now, and I couldn't find any obvious problems. If anything, it's faster and uses less memory. Native async/await would be 😚👌.

@macrozone
Copy link
Contributor

If I could place a wish for a next "banner feature" that would be first-class support for new platforms like "react-native" or "desktop (electron)": #8615

this would move meteor one step more ahead!

@abernix
Copy link
Contributor

abernix commented May 31, 2017

@macrozone I'm not sure it'll hit the mark for 1.6 but any help you could provide in addressing the action items identified in that issue you've linked to would certainly be helpful in achieving that goal (which I agree would be great!), in particular, the SockJS-factor (#8621).

@finchalyzer
Copy link

Can confirm @benjamn. Just tried to run Meteor with Node.js 8.0.0 on macOS 10.12.4 on a fairly large project and it runs without any obvious problems.

On the build process had to remove node-inspector thought as it terminated with this error node-inspector/v8-debug/issues/41 . Couldn't this be replaced with the built in v8_inspector introduced in Node 6 - nodejs/node/pull/6792 ?

@abernix
Copy link
Contributor

abernix commented May 31, 2017

@finchalyzer

On the build process had to remove node-inspector thought as it terminated with this error node-inspector/v8-debug#41 . Couldn't this be replaced with the built in v8_inspector introduced in Node 6 - nodejs/node#6792 ?

Yes, this is exactly what @benjamn stated needed to be done in this comment above ^^ (4th bullet-point): #8728 (comment)

@vladejs
Copy link

vladejs commented May 31, 2017 via email

@stubailo
Copy link
Contributor

I think actually the biggest benefit of Meteor over Next is that Next is super opinionated about routing, babel config, and more, and Meteor is a more general purpose tool even in the context of React. Built in HMR would be neat though! And of course Next also has Its advantages, so it might be a better choice for some apps!

@ankibalyan
Copy link

What about Graphql, Apollo dedicatedly from meteor support? I guess this was in discussion to come up with Meteor v1.5 or least Meteor v1.6.

@itshallrun
Copy link

itshallrun commented May 31, 2017

I am not a professional, so for sure, I am not the right person to judge such things and maybe I am wrong. But as a (most probably) average meteor dev I see node 6 only as a nice to have featured today. This upgrade will bring a lot for sure, but a lot of those changes will be under the hood and will not directly affect the dev process!? While HMR will significantly speed it up. It will be so much faster to develop react applications...

@benjamn
Copy link
Contributor Author

benjamn commented May 31, 2017

It will be so much faster to develop react applications

Hot module replacement for React feels relatively automatic because it relies on special assumptions about React components and the React rendering process.

Meteor is hardly just a tool for building React apps, and the general problem of hot module replacement is "solved" only if you're willing to attach manual event handlers to the Webpack module.hot object in many/most of your modules. In other words, HMR is a ton of work (on the part of the developer, you!) compared to just reloading the page.

There's still room to make Meteor rebuilds faster when only one file has changed, but much of that work already happened in Meteor 1.4.2, and further progress will not require anything like hot module replacement.

@fermuch
Copy link

fermuch commented Jun 1, 2017

Is this the right place to have a discussion about new features for meteor? I'm not saying I'm against any of these topics, but I feel like, by talking here, we're not exposing our thoughts to the majority of the Meteor community, which is located at the forums.

Most of the newcomers to Meteor are in the forums, and I believe that's the place where we should be discussing this kind of things. Issues / PR feel more formal than a forum, and you need some understanding of how the internals of the project work before commenting here, or else you'll feel dumb opening issues just to be sent somewhere else.

So, why don't we move this discussion to the forums, ask kindly to @benjamn, @abernix and others about their opinions with these topics there, and keep this PR thread for the progress involving making Meteor 1.6 a reality?

@Type1J
Copy link

Type1J commented Jun 1, 2017

It really isn't a good time for new features. We really need this debt of not being able to run on the latest Node.js to be paid.

To anyone reading this issue's comments: Please don't request new features for this upcoming release 1.6 here. For 1.7 on, request whatever you want (in the forums or other issues' comments), but please let 1.6 finally give us the latest Node.js.

@stubailo
Copy link
Contributor

stubailo commented Jun 1, 2017

Yeah this isn't the best place for feature discussions.

@GeoffreyBooth
Copy link
Contributor

Getting back to 1.6 and Node 6 or 8, one thing that I noticed while working on another project is that almost every ES2015+ feature I wanted to type, including async functions, are supported natively from Node 7.6+. The notable exception is import and export, of course, as that still isn’t standardized. But if I stick with CommonJS, the future is now for ES2015 in Node.

Something to consider would be to intelligently choose the Babel preset for server-side code. So if there’s a preset for “Node 8,” say, that transpiles down import and export statements and the few other ES features that Node 8 doesn’t support, but leaves all the natively-supported ES features alone, that preset should be chosen automatically for all server-only code. Presumably this native ES2015+ syntax should run faster than the compiled-to-ES5 transpilation.

@mjmasn
Copy link
Contributor

mjmasn commented Jun 2, 2017

@GeoffreyBooth native isn't necessarily faster (some features are in fact up to 23x slower with babel + node 7, and there's even one that's 2909x slower with traceur + Firefox - though presumably that one is a bad implementation). Transpiling to ES5 still makes sense I think.

The comparison doesn't include Node 8 yet but I imagine many of the features will still be slightly slower than ES5.

History.md Outdated
@@ -1,4 +1,4 @@
## v.NEXT
## v1.5, 2017-10-30

Choose a reason for hiding this comment

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

1.6?

@benjamn benjamn merged commit e0c2849 into master Oct 27, 2017
@abernix
Copy link
Contributor

abernix commented Oct 27, 2017

🎉 🎈 🎊 🎉 🎊 🎉 🎈 🎊

      1️⃣ . 6️⃣!

🎉 🎈 🎊 🎉 🎊 🎉 🎈 🎊

Meteor 1.6 is not marked as "recommended" (that is to say, the "default" for apps), but it is available to those who use the --release 1.6 flag with either meteor create or meteor update. As @benjamn mentioned previously, the intention is to officially recommend it on Monday.

@nadeemja
Copy link

<3

@gregory
Copy link

gregory commented Oct 28, 2017

tried to update to 1.6 and ran into some issues:


node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/debug/v1.0.1/node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug@1.0.1 and node@8.8.1 (node-v57 ABI) (falling back to source compile with node-gyp)
  CXX(target) Release/obj.target/debug/src/debug.o
../src/debug.cc:41:20: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        v8::Debug::Call(context, fn);
                   ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8-debug.h:192:3: note: 'Call' has been explicitly marked deprecated here
  V8_DEPRECATED("No longer supported",
  ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/debug.cc:52:45: warning: 'GetDebugContext' is deprecated [-Wdeprecated-declarations]
        Isolate* debug_isolate = v8::Debug::GetDebugContext(Isolate::GetCurrent())->GetIsolate();
                                            ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8-debug.h:208:3: note: 'GetDebugContext' has been explicitly marked
      deprecated here
  V8_DEPRECATED("Use v8-inspector",
  ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/debug.cc:57:20: warning: 'SendCommand' is deprecated [-Wdeprecated-declarations]
        v8::Debug::SendCommand(debug_isolate, *command, command.length());
                   ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8-debug.h:169:3: note: 'SendCommand' has been explicitly marked deprecated
      here
  V8_DEPRECATED("No longer supported",
  ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/debug.cc:71:51: warning: 'GetDebugContext' is deprecated [-Wdeprecated-declarations]
        Local<Context> debug_context = v8::Debug::GetDebugContext(Isolate::GetCurrent());
                                                  ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8-debug.h:208:3: note: 'GetDebugContext' has been explicitly marked
      deprecated here
  V8_DEPRECATED("Use v8-inspector",
  ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/debug.cc:78:22: error: no member named 'GetMirror' in 'v8::Debug'
          v8::Debug::GetMirror(info.GetIsolate()->GetCurrentContext(), info[0]);
          ~~~~~~~~~~~^
../src/debug.cc:80:38: warning: 'GetDebugContext' is deprecated [-Wdeprecated-declarations]
          debug_context = v8::Debug::GetDebugContext(Isolate::GetCurrent());
                                     ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8-debug.h:208:3: note: 'GetDebugContext' has been explicitly marked
      deprecated here
  V8_DEPRECATED("Use v8-inspector",
  ^
/Users/greg/.meteor/packages/meteor-tool/.1.6.0.1okmj9c++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
5 warnings and 1 error generated.
m

@benjamn
Copy link
Contributor Author

benjamn commented Oct 28, 2017

@gregory The node-inspector package is no longer necessary (and probably no longer works) with Node 8. Try meteor --inspect-brk instead, as described in the release notes. I think the new debugging experience is going to make previous users of node-inspector very happy!

@vladejs
Copy link

vladejs commented Oct 28, 2017

Great release.
Now, let's enable Coffee Script 2+

@vladejs
Copy link

vladejs commented Oct 28, 2017

So what's this? When trying to install with chocolatey, it says "downloading meteor 64 bits" but instead the zip is 32bits version. See
64

@msand
Copy link
Contributor

msand commented Oct 29, 2017

https://packages.meteor.com/bootstrap-link?arch=os.windows.x86_64 seems to give the x86_32 version still

@msand
Copy link
Contributor

msand commented Oct 29, 2017

@gregory
Copy link

gregory commented Oct 29, 2017

@benjamn Thanks a lot for all your hard work!
I was so excited to finally get a legit debugger, that i tried it right away - bug as soon as i tried to load a object i got the error below, then got sad

packages/meteor.js:1086 Uncaught Error: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment.
    at Object.Meteor._nodeCodeMustBeInFiber (packages/meteor.js:1086:11)
    at Meteor.EnvironmentVariable.EVp.get (packages/meteor.js:1099:10)
    at Object.collection.(anonymous function) [as findOne] (packages/matb33_collection-hooks.js:132:37)
    at ns.Collection.findOne (packages/mongo/collection.js:334:29)
    at <anonymous>:1:13

@benjamn
Copy link
Contributor Author

benjamn commented Oct 29, 2017

@vladejs @msand This is expected. The 64-bit download won't work until the release is "recommended" tomorrow (soon!).

@benjamn
Copy link
Contributor Author

benjamn commented Oct 29, 2017

@gregory Unlike meteor shell, the Node inspector doesn't automatically run all console commands in a Fiber, so you may have to do something like

Fiber(() => {
  const doc = collection.findOne(...);
  // do something with doc
}).run();

or

Promise.resolve().then(
  () => collection.findOne(...)
).then(doc => {
  // do something with doc
});

This works because all Promise callbacks run in a Fiber (in Meteor, at least).

For that matter, the Node inspector doesn't use Babel to compile the code you run, so you may notice be other differences in behavior / supported syntax, though Node 8 supports many more native ECMAScript features than Node 4. You should think of the inspector as a low-level tool for debugging raw JavaScript as it appears to Node.

Perhaps a partial solution would be to run meteor --inspect-brk in one console window and meteor shell in a separate window, so that you can execute commands with full ECMAScript and Fiber support in the shell. That's not a perfect solution because the shell runs commands in global/application scope rather than the current inspector scope, but it might help.

@gregory
Copy link

gregory commented Oct 30, 2017

[...]We've removed the underscore dependency from a number of core packages, so you may need to depend on it explicitly[...]

I know what i'll say is probably really bad, but we have been using underscore all over the place.
I had to move on, and couldn't just go all over the place, so here is a little bash command that will import underscore in every file in folders that calls _.
grep -lr ' _\.' ./{FOLDER_1,FOLDER_X} | xargs -I{} sed -i "" -e '1 s/^/import _ from "underscore"\'$'\n/' {}

I'm sure there is probably an easier way to do it, but this helped me move on. Maybe it'll help someone in the same spot.

@hexsprite
Copy link
Contributor

@gregory using meteor add underscore doesn't make it globally available?

@gregory
Copy link

gregory commented Oct 30, 2017

no @hexsprite - at least not underscore@1.0.10 - did that worked for you?

@FriOne
Copy link

FriOne commented Oct 30, 2017

@benjamn How can I install 16 version on my windows? Install page still leads to 1.5 version :( I had wait this release to try meteor first time, I didn't want to uninstall my NodeJS 8 :)

@mattmccutchen
Copy link
Contributor

Looks like Meteor 1.6 is now recommended (see meteor show --ejson METEOR@1.6 | grep recommended), for anyone else who was expecting that to be announced here.

@abernix
Copy link
Contributor

abernix commented Oct 30, 2017

The Chocolatey meteor package is available now and should install 64-bit versions of Meteor when available (i.e. Meteor 1.6+) on 64-bit platforms. Installation is hopefully as easy as:

choco install meteor

cc @FriOne @vladejs @msand

@coagmano
Copy link
Contributor

@FriOne FYI Meteor bundles a pinned version of Node and npm, so Meteor will always run independent of the version of node installed on your machine

@rcurrier666
Copy link
Contributor

rcurrier666 commented Oct 31, 2017 via email

@benjamn
Copy link
Contributor Author

benjamn commented Oct 31, 2017

@rcurrier666 I've seen that before, as a result of upgrading our internal Babel plugins to version 7, though I don't know what would be causing it now. Can you open a new issue for that?

@benjamn
Copy link
Contributor Author

benjamn commented Oct 31, 2017

In order to respect the time and attention of the 79 awesome people who have contributed to this issue over the last five months, I'm going to turn off further commenting on this thread now. Please open new issues if you encounter any problems updating to Meteor 1.6. Thanks again, everyone!

@meteor meteor locked and limited conversation to collaborators Oct 31, 2017
@abernix abernix removed the in-development We are already working on it label Nov 4, 2017
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.

None yet