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

build: Add rollup and tslib to allow for changing branches while server is running #2798

Closed
wants to merge 3 commits into from

Conversation

driskull
Copy link
Member

Related Issue: #

Summary

This fixes a rollup error that occurs when switching branches and the demo server is running.

build: Add rollup and tslib to allow for changing branches while server is running

@driskull driskull requested a review from jcfranco August 12, 2021 20:27
@driskull driskull self-assigned this Aug 12, 2021
@driskull driskull requested a review from a team as a code owner August 12, 2021 20:27
@jcfranco
Copy link
Member

Interesting. Could you add more info about the error, what caused it and how this fixes it? Looking at the changes, I thought it was related to the ES5 output, but that's only enabled for production. From what I understand, the Stencil build takes care of this and doesn't downlevel emit, but I could be wrong.

@driskull
Copy link
Member Author

driskull commented Aug 12, 2021

This is reproducible by:

  • npm start on master
  • wait for server to be setup
  • switch to a branch that has a lot of file changes
  • notice that a rollup error occurs

image

[28:47.2]  copy finished (107 files) in 2.26 s
[29:02.4]  generate lazy finished in 17.41 s
[29:13.9]  generate hydrate app finished in 28.93 s

[ ERROR ]  Rollup: Parse Error: ./node_modules/@stencil/core/compiler/stencil.js:23708:26
           Unexpected token

  L23707:  TextMetrics: C,
  L23708:  TextTrack: C, 
  L23709:  TextTrackCue: C,

[29:13.9]  rebuild failed, watching for changes... in 36.95 s

ionic-team/stencil#2673
ionic-team/stencil#1305
rollup/plugins#287

@jcfranco
Copy link
Member

Thanks for the additional info.

Unfortunately, I'm still seeing the build error with this and I'm now getting an out-of-memory error (possibly to an extra TS build?):

[ ERROR ]  Rollup: Parse Error: ./node_modules/@stencil/core/compiler/stencil.js:23708:26
           Unexpected token

  L23707:  TextMetrics: C,
  L23708:  TextTrack: C,
  L23709:  TextTrackCue: C,

[03:57.8]  rebuild failed, watching for changes... in 54.83 s


<--- Last few GCs --->

[83882:0x104e00000]   936690 ms: Mark-sweep (reduce) 4083.0 (4105.4) -> 4082.7 (4105.9) MB, 4915.5 / 0.0 ms  (average mu = 0.106, current mu = 0.001) allocation failure scavenge might not succeed
[83882:0x104e00000]   940900 ms: Mark-sweep (reduce) 4083.8 (4102.9) -> 4083.3 (4104.6) MB, 4205.1 / 0.1 ms  (average mu = 0.058, current mu = 0.001) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory

It'd be nice to get some additional info on what the issue is and how the changes in this PR address it. I'm also not sure where the tslib came from since it's not referenced in the linked issues.

@driskull
Copy link
Member Author

Ok i'll close this.

@driskull driskull closed this Aug 16, 2021
@driskull driskull deleted the dris0000/rollup-ts branch August 16, 2021 16:26
@jcfranco
Copy link
Member

FWIW, the out-of-memory error seems to be unrelated to these changes. I got the error during a rebase.

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

Successfully merging this pull request may close these issues.

None yet

2 participants