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

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

Open
gadicc opened this issue Apr 23, 2016 · 38 comments
Open

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

gadicc opened this issue Apr 23, 2016 · 38 comments
Milestone

Comments

@gadicc
Copy link
Owner

gadicc commented Apr 23, 2016

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
Copy link

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

@gadicc
Copy link
Owner Author

gadicc commented Apr 23, 2016

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 gadicc changed the title Help test gadicc:ecmascript-hot@=1.3.2-refactor.5 Help test gadicc:ecmascript-hot@=1.3.2-refactor.6 Apr 25, 2016
@gadicc gadicc changed the title Help test gadicc:ecmascript-hot@=1.3.2-refactor.6 Help test gadicc:ecmascript-hot@=1.3.2-refactor.7 Apr 29, 2016
@gadicc
Copy link
Owner Author

gadicc commented Apr 29, 2016

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
Copy link

dagatsoin commented May 1, 2016

@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
Copy link
Contributor

clayne11 commented May 2, 2016

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.

@dagatsoin
Copy link

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?

@gadicc
Copy link
Owner Author

gadicc commented May 3, 2016

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
Copy link

Yep it seems to work, thx @gadicc :)

@gadicc
Copy link
Owner Author

gadicc commented May 3, 2016

Great stuff! Thanks for reporting back.

@clayne11
Copy link
Contributor

clayne11 commented May 3, 2016

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
Copy link
Contributor

clayne11 commented May 3, 2016

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
Copy link
Owner Author

gadicc commented May 3, 2016

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
Copy link
Contributor

clayne11 commented May 3, 2016

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
Copy link
Owner Author

gadicc commented May 4, 2016

@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 gadicc changed the title Help test gadicc:ecmascript-hot@=1.3.2-refactor.7 Help test gadicc:ecmascript-hot@=1.3.2-refactor.8 May 4, 2016
@gadicc
Copy link
Owner Author

gadicc commented May 4, 2016

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
Copy link

priezz commented May 4, 2016

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

@clayne11
Copy link
Contributor

clayne11 commented May 4, 2016

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 gadicc added this to the v2 milestone May 7, 2016
@gadicc
Copy link
Owner Author

gadicc commented May 7, 2016

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 gadicc closed this as completed May 7, 2016
@gadicc
Copy link
Owner Author

gadicc commented May 18, 2016

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 gadicc reopened this May 18, 2016
@gadicc gadicc changed the title Help test gadicc:ecmascript-hot@=1.3.2-refactor.8 Help test gadicc:[email protected] May 18, 2016
@clayne11
Copy link
Contributor

Still working for me.

On Wed, May 18, 2016, 08:22 Gadi Cohen [email protected] wrote:

Reopened #51 #51.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#51 (comment)

@jthomaschewski
Copy link

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.

@priezz
Copy link

priezz commented May 19, 2016

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.

@gadicc gadicc changed the title Help test gadicc:[email protected] Help test gadicc:[email protected] May 19, 2016
@gadicc
Copy link
Owner Author

gadicc commented May 19, 2016

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
Copy link
Owner Author

gadicc commented May 23, 2016

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

This was referenced May 23, 2016
@priezz
Copy link

priezz commented May 23, 2016

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
Copy link

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
Copy link

gsabran commented Jun 2, 2016

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)

@gsabran
Copy link

gsabran commented Jun 2, 2016

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

@gadicc
Copy link
Owner Author

gadicc commented Jun 3, 2016

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 added a commit that referenced this issue Jun 6, 2016
Published gadicc:[email protected].
Published gadicc:[email protected].
Published gadicc:[email protected].
Published gadicc:[email protected].
Published gadicc:[email protected]
@gadicc gadicc changed the title Help test gadicc:[email protected] Help test gadicc:[email protected] (for Meteor 1.3.3) Jun 6, 2016
@gadicc
Copy link
Owner Author

gadicc commented Jun 6, 2016

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
Copy link
Owner Author

gadicc commented Jun 7, 2016

@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
Copy link
Owner Author

gadicc commented Jun 20, 2016

There's a gadicc:[email protected] 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
Copy link
Contributor

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:[email protected] is not satisfied by gadicc:hot 0.0.2.
   Constraints on package "gadicc:hot":
   * gadicc:[email protected] <- 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:[email protected] and nothing else that is gadicc:XXX.

@gadicc
Copy link
Owner Author

gadicc commented Jun 20, 2016

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:[email protected] directly to force it on an app level.

@priezz
Copy link

priezz commented Jun 20, 2016

@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
Copy link
Contributor

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

@markshust
Copy link

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

@jthomaschewski
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants