gadicc / meteor-hmr

Hot Module Replacement for Meteor; in your app, with react, with build plugins
Other
142 stars 10 forks source link

Help test gadicc:ecmascript-hot@2.0.0-beta.4 (for Meteor 1.3.3) #51

Open gadicc opened 8 years ago

gadicc commented 8 years ago

First see https://github.com/gadicc/meteor-react-hotloader/blob/master/docs/Upgrading.md.

Please mention general issues here (or open a new issue), and anything specific to the new alpha release of meteor-react-hotloader in this issue.

Please report successes too! And mention your OS. I'm assuming Windows is still broken from the issue in the fast releases. Will mention something in the forums early next week after this super early release has had some use.

cc: @clayne11, @tomitrescak

tomitrescak commented 8 years ago

Am a bit puzzled with this new approach. Does this mean, that hot-loader will now make it to the production code?

gadicc commented 8 years ago

Hey @tomitrescak, sorry, I've made so many changes in the last few days I'm not sure exactly which new approach you're referring too :) But no, nothing lands up in production (although in theory, one day, there's stuff we might want to... the webpack HMR API works in production, I think).

gadicc commented 8 years ago

I'm away for the long weekend. But just published gadicc:ecmascript-hot@=1.3.2-refactor.7 which includes all the fixes to recent issues (as discussed in those issues), i.e. all the Windows fixes. Many thanks to @Vincent-P who helped with all the Windows issues, especially since I don't have a Windows installation here.

dagatsoin commented 8 years ago

@gadicc sorry, I am a bit lost with the install. Do we have to simply meteor add gadicc:ecmascript-hot@=1.3.2-refactor.7 or to follow https://github.com/gadicc/meteor-react-hotloader/blob/master/docs/Upgrading.md instructions?

clayne11 commented 8 years ago

If you only want to have the ability to hot-reload modules then you only need meteor add gadicc:ecmascript-hot@=1.3.2-refactor.7.

If you want to hot-reload react components without losing state then you should follow these instructions: https://github.com/gadicc/meteor-hmr/blob/master/docs/React_Hotloading.md.

If you're updating from gadicc:ecmascript-hot@1.3.1_1 then you need to following the upgrading instructions that you linked to.

dagatsoin commented 8 years ago

thx @clayne11

I only want the ability to use .babelrc file. I see in https://github.com/gadicc/meteor-hmr/blob/master/docs/Upgrading.md that this project is now only for hot reload purpose. But it talks about the 1.3.3 meteor version (which is not released yet, it is?)

So what do I have to do?

gadicc commented 8 years ago

Hey @dagatsoin, yeah, we're expecting the official babelrc support to be around before publishing the next stable (all the docs are gearing up in preparation for this). I'm not sure exactly when it will land though. Fortunately though, in anticipation, we split all the babelrc related stuff out of the project. Can you try just replacing ecmascript with gadicc:ecmascript-babelrc and confirm if it all works? You can still refer to the Babelrc docs in the docs directory here if needed.

dagatsoin commented 8 years ago

Yep it seems to work, thx @gadicc :)

gadicc commented 8 years ago

Great stuff! Thanks for reporting back.

clayne11 commented 8 years ago

The new version of react-hot-loader has fixed the infinite loop issue I was having. I'm now able to properly import 'react-hot-loader/patch' without breaking my app.

clayne11 commented 8 years ago

Hot loading seems to have stopped working for me and I'm not sure why.

Every time I save a file, the file gets updated, but then the hot-loader seems to go right up to the entry point for my app as if that file had changed, even though I'm not touching it. Obviously the entry point to my app isn't hot and so it's causing an HCP.

This is all happening after I hit save once in Atom, saving the file /imports/casalova-listing-view/listing-view-with-data.js:

screen shot 2016-05-03 at 12 48 05 pm

When I use vim the file change doesn't even get caught or updated at all and the app rebuilds and does a full HCP.

gadicc commented 8 years ago

Great news, @clayne11! For the first part :) I'll have more time for this and the other issues tomorrow. I guess what's not well tested is the same file being imported by multiple other files... did you always used to get so many console lines from a hot update? I'll also add another debug level which will show the import route being followed. Does vim maybe do an atomic write like intellij? I hope to solve most of these issues this week.

clayne11 commented 8 years ago

It's possible that vim does atomic writes. Good point.

No, I didn't used to get so many console statements. I would usually get 2-3 [gadicc:hot] Updating ... lines but none of the other ~20 where it looks like my entry file has changed (which it hasn't).

gadicc commented 8 years ago

@clayne11, you probably saw, but

P.S. I checked and vim does have an atomic save option. Will be very happy if we can fix this, seems to affect a lot of people.

gadicc commented 8 years ago

refactor.8 is just a small, potential fix for #53 before we try something else. No need to upgrade if file saves already work for you.

priezz commented 8 years ago

Still not working for me... Please see #67.

clayne11 commented 8 years ago

refactor.9 has fixed the issues I was having with refactor.7 that was causing an HCP on every code change since it thought my entry point was being modified. Also fixed atomic writes for me.

Working for me with:

OS: Mac OS X 10.11 Text editors: Atom, vim

Great work!

gadicc commented 8 years ago

Thanks everyone for helping with this experimental release! If any new issues arise, please open separate bug reports for them. I hope to have a v2.0.0-rc.0 out next week.

gadicc commented 8 years ago

Hey all, haven't had as much time as I'd like to work on this lately, and it's difficult because rebuilding build plugins takes forever :/ I squeezed in quite a lot of stuff I wanted in rc0 recently, it seemed too much to jump straight to an rc, so, gadicc:ecmascript-hot@2.0.0-beta.3 is out now, and would love I guess everyone who helped out here to just confirm it all still works :D

clayne11 commented 8 years ago

Still working for me.

On Wed, May 18, 2016, 08:22 Gadi Cohen notifications@github.com wrote:

Reopened #51 https://github.com/gadicc/meteor-hmr/issues/51.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/gadicc/meteor-hmr/issues/51#event-664315067

jthomaschewski commented 8 years ago

I'm unable to install beta.4:

Errors prevented startup:
   While selecting package versions:
   error: No version of gadicc:ecmascript-hot satisfies all constraints: @2.0.0-beta.4
   Constraints on package "gadicc:ecmascript-hot":
   * gadicc:ecmascript-hot@2.0.0-beta.4 <- top level

Constraint in .meteor/packages is gadicc:ecmascript-hot@2.0.0-beta.4

2.0.0-beta.3 works fine. No problems so far.

priezz commented 8 years ago

same for me

2016-05-19 16:49 GMT+03:00 jbbr notifications@github.com:

I'm unable to install beta.4:

Errors prevented startup: While selecting package versions: error: No version of gadicc:ecmascript-hot satisfies all constraints: @2.0.0-beta.4 Constraints on package "gadicc:ecmascript-hot":

  • gadicc:ecmascript-hot@2.0.0-beta.4 <- top level

Constraint in .meteor/packages is gadicc:ecmascript-hot@2.0.0-beta.4

2.0.0-beta.3 works fine. No problems so far.

gadicc commented 8 years ago

Thanks, everyone! Sorry, not sure where that .4 came from, it is indeed .3... did so many publishes recently I must have gotten a bit dizzy :)

Let's see how this goes... in a few more days I'll announce in on the forums too... if it proves stable we can maybe even skip the rc's... it's inevitable with more users something will crop up though. But it's a great help knowing that so far so good.

gadicc commented 8 years ago

Just a heads up, I was planning on releasing a stable this week if nothing came else up, but now with Meteor 1.3.3 beta0 out, I'm going to target that instead, with the aim to release our stable in tandem with the 1.3.3 stable.

Reason being, I'd prefer to release just one stable, that won't require many more changes. 1.3.3 both has some big under-the-hood changes but also includes its own babelrc supports which massively reduces the strain on this project :) I'll report back here and in #97.

As I side note, I really appreciate the efforts of other users helping each other (special mention to @clayne11, @tomitrescak, @sammkj, @priezz). I was actually just thinking this weekend how the open-sourcing and support of this project has unfortunately hurt my work commitments this year but seeing these kinds of user-interaction going on really helps and keeps me motivated :)

priezz commented 8 years ago

Gadi, just keep moving forward! Sure, MDG will implement better build and hot reload systems some day, but the projects like yours prevent many people from switching from Meteor to something else right today. You know very well, that many of us are really tied of the never ending rebuild/reload.

tomitrescak commented 8 years ago

Gadi, I'm supposed to be finishing a grant application with deadline on Wednesday, instead I was correcting the Atom plugin for Mantra and my Meteor packages as too many requests piled up. I know exactly how you feel. Open source community is sooo inspiring but also very time demanding .. Yet I love it from the bottom of my heart! Thanks for working on this functionality that made me drop the Webpack solution and saved me heaps of time and debugging, deploying issues. I'll soon post a small info on my road to understanding how this all works. Also, I have the repo that extends your boilerplate on Mantra with Redux and Apollo, so if you want we can put it in your docs.

gsabran commented 8 years ago

Is it beta.3 or beta.4 ? You said it's .3: https://github.com/gadicc/meteor-hmr/issues/51#issuecomment-220356254 but here it's .4 https://github.com/gadicc/meteor-hmr/blob/master/packages/ecmascript-hot/package.js#L5 (and as mentioned by @jbbr I can't install .4 either)

gsabran commented 8 years ago

with beta.3 I'm getting

=> Errors prevented startup:                  

   While loading plugin `compile-ecmascript-hot` from package `gadicc:ecmascript-hot`:
   error: Can't load npm module 'ws' from packages/gadicc_hot-build.js. Check your Npm.depends().
   packages/gadicc_hot-build/accelerator.js:53:1: undefined is not a function

which seems to be fixed in https://github.com/gadicc/meteor-hmr/commit/7828863a9971cf482fc191d4fdbbf3b6a447c573 that is referenced as beta.4

gadicc commented 8 years ago

It's beta.3, but only for Meteor 1.3.2.4. The beta.4 was a typo, but yes, that version is coming soon and with Meteor 1.3.3 support. Seems to be working well so far but haven't spent enough time with it yet to feel comfortable publishing. If you're comfortable running from master with local packages, you could give it a spin. Please report any issues. I'm away for the weekend though so will only be able to respond on Monday.

gadicc commented 8 years ago

Hey all, a bit late, but, just published gadicc:ecmascript-hot@2.0.0-beta.4 for Meteor 1.3.3... as per the updated README and Updating docs, you should remove meteor from your .babelrc presets and npm rm --save-dev babel-preset-meteor.

gadicc commented 8 years ago

@tomitrescak, sure, I'll gladly accept a PR that links to your boilerplate from the Boilerplate docs, thanks!

And thanks @priezz and @tomitrescak for the supportive words :D

gadicc commented 8 years ago

There's a gadicc:ecmascript-hot@2.0.0-beta.6 out with all the latest changes to date, mostly for Meteor 1.3.3. I've only had a few hours testing with Meteor 1.3.3.1 but so far so good.

clayne11 commented 8 years ago

I'm having trouble installing 2.0.0-beta.6 from Atmosphere.

I'm getting a version constraint issue:

=> Errors prevented startup:

   While selecting package versions:
   error: Conflict: Constraint gadicc:hot@2.0.0-beta.3 is not satisfied by gadicc:hot 0.0.2.
   Constraints on package "gadicc:hot":
   * gadicc:hot@2.0.0-beta.3 <- gadicc:ecmascript-hot 2.0.0-beta.6

=> Your application has errors. Waiting for file change.

My .meteor/versions and .meteor/packages folder only contain gadicc:ecmascript-hot@2.0.0-beta.6 and nothing else that is gadicc:XXX.

gadicc commented 8 years ago

Argh, hate it when Meteor's not clear about where constraints come from. One of your packages maybe? Any old local copies of meteor-hmr in your packages folder? What happens if you meteor add gadicc:hot@2.0.0-beta.3 directly to force it on an app level.

priezz commented 8 years ago

@clayne11, I believe you have Meteor 1.3.3 while 2.0.0-beta.6 has a constraint for Meteor 1.3.3.1 minimum. Update Meteor and the issue will go away.

clayne11 commented 8 years ago

Thanks! I updated and I can confirm that it's working now.

markshust commented 8 years ago

Do things still work with the new Meteor 1.3.5.1 (and the upcoming 1.4 release)?

jthomaschewski commented 8 years ago

@markoshust I'm using 2.0.0-beta.6 without major problems on Meteor 1.4-rc. So I assume this will work with the upcoming 1.4 stable too.