Help test gadicc:ecmascript-hot@2.0.0-beta.4 (for Meteor 1.3.3)
gadicc opened this issue · 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
Am a bit puzzled with this new approach. Does this mean, that hot-loader will now make it to the production code?
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
andaccelerator.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.
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 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?
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.
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?
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.
Great stuff! Thanks for reporting back.
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.
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
:
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.
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.
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, you probably saw, but
gadicc:ecmascript-hot@=1.3.2-refactor.8
in #53 (comment) (possible fix for atomic writes)gadicc:hot@0.0.23
in #65 (comment) (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.
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.
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!
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.
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
Still working for me.
On Wed, May 18, 2016, 08:22 Gadi Cohen notifications@github.com wrote:
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#51 (comment)
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.
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.
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.
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 :)
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.
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.
Is it beta.3
or beta.4
? You said it's .3: #51 (comment) 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)
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 7828863 that is referenced as beta.4
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.
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
.
@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
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.
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
.
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.
@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.
Thanks! I updated and I can confirm that it's working now.
Do things still work with the new Meteor 1.3.5.1 (and the upcoming 1.4 release)?
@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.