meteor-hmr icon indicating copy to clipboard operation
meteor-hmr copied to clipboard

Help test gadicc:[email protected] (for Meteor 1.3.3)

Open gadicc opened this issue 8 years ago • 38 comments

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

gadicc avatar Apr 23 '16 09:04 gadicc

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

tomitrescak avatar Apr 23 '16 10:04 tomitrescak

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).

  • You can take a look at the hot-build sources, e.g. hot-server.js and accelerator.js - they both short-circuit in production (and testing).
  • In your own code, anything hot related is wrapped in if (module.hot) { ... } which will be undefined in production.
  • In RHLv3, <AppContainer/> is different in production, it just passes through your component without applying any react-hot-loading stuff.

gadicc avatar Apr 23 '16 12:04 gadicc

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.

gadicc avatar Apr 29 '16 09:04 gadicc

@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?

dagatsoin avatar May 01 '16 21:05 dagatsoin

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:[email protected]_1 then you need to following the upgrading instructions that you linked to.

clayne11 avatar May 02 '16 00:05 clayne11

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?

  • switch on 1.3.3 (how to install a meteor version from github?)
  • stay with 1.3.2.4. In this case, which version of HMR I have to use to get .babelrc file?

dagatsoin avatar May 03 '16 08:05 dagatsoin

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.

gadicc avatar May 03 '16 09:05 gadicc

Yep it seems to work, thx @gadicc :)

dagatsoin avatar May 03 '16 09:05 dagatsoin

Great stuff! Thanks for reporting back.

gadicc avatar May 03 '16 09:05 gadicc

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 avatar May 03 '16 16:05 clayne11

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.

clayne11 avatar May 03 '16 16:05 clayne11

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.

gadicc avatar May 03 '16 18:05 gadicc

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).

clayne11 avatar May 03 '16 19:05 clayne11

@clayne11, you probably saw, but

  • gadicc:ecmascript-hot@=1.3.2-refactor.8 in https://github.com/gadicc/meteor-hmr/issues/53#issuecomment-216757396 (possible fix for atomic writes)
  • gadicc:[email protected] in https://github.com/gadicc/meteor-hmr/issues/65#issuecomment-216760350 (better logging for no hot.accept() in import chain)

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 avatar May 04 '16 06:05 gadicc

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.

gadicc avatar May 04 '16 10:05 gadicc

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

priezz avatar May 04 '16 10:05 priezz

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!

clayne11 avatar May 04 '16 16:05 clayne11

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 avatar May 07 '16 10:05 gadicc

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:[email protected] is out now, and would love I guess everyone who helped out here to just confirm it all still works :D

gadicc avatar May 18 '16 12:05 gadicc

Still working for me.

On Wed, May 18, 2016, 08:22 Gadi Cohen [email protected] 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

clayne11 avatar May 18 '16 13:05 clayne11

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:[email protected] <- top level

Constraint in .meteor/packages is gadicc:[email protected]

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

jthomaschewski avatar May 19 '16 13:05 jthomaschewski

same for me

2016-05-19 16:49 GMT+03:00 jbbr [email protected]:

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":

Constraint in .meteor/packages is gadicc:[email protected]

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

priezz avatar May 19 '16 13:05 priezz

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 avatar May 19 '16 15:05 gadicc

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 :)

gadicc avatar May 23 '16 10:05 gadicc

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.

priezz avatar May 23 '16 11:05 priezz

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.

tomitrescak avatar May 23 '16 12:05 tomitrescak

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 avatar Jun 02 '16 16:06 gsabran

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

gsabran avatar Jun 02 '16 16:06 gsabran

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 avatar Jun 03 '16 09:06 gadicc

Hey all, a bit late, but, just published gadicc:[email protected] 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 avatar Jun 06 '16 12:06 gadicc