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

Transpile bug upon using pull-all.js #1179

Open
zepumph opened this issue Jan 4, 2022 · 14 comments
Open

Transpile bug upon using pull-all.js #1179

zepumph opened this issue Jan 4, 2022 · 14 comments

Comments

@zepumph
Copy link
Member

zepumph commented Jan 4, 2022

I am encountering a bit of strange behavior with the Transpiler recently. It always happens after activeRepos gets reloaded. Basically the problem is that after pull all, the transpiler freezes, and doesn't detect any further changes. I believe that it is from this line, but I can't be sure. . . .

Looking at the code, it seems like there isn't a trim command in

const newRepos = newActiveRepos.filter( repo => !this.activeRepos.includes( repo ) );
like there is in the initial load. I will try to trim on that line too to see if it solves the issues.

Here is the output of transpiling through a pull all. Note that all the changes that occur after the restart occured while the first instance was running. It was only upon restart that the transpiler noted the changes and recomputed them.


Finished initial transpilation in 9559ms
Watching...
reloaded active repos
New repo detected in active-repos, transpiling: acid-base-solutions
New repo detected in active-repos, transpiling: aqua
New repo detected in active-repos, transpiling: area-builder
New repo detected in active-repos, transpiling: area-model-algebra
New repo detected in active-repos, transpiling: area-model-common
New repo detected in active-repos, transpiling: area-model-decimals
New repo detected in active-repos, transpiling: area-model-introduction
New repo detected in active-repos, transpiling: area-model-multiplication
New repo detected in active-repos, transpiling: arithmetic
New repo detected in active-repos, transpiling: assert
New repo detected in active-repos, transpiling: atomic-interactions
New repo detected in active-repos, transpiling: axon
New repo detected in active-repos, transpiling: babel
New repo detected in active-repos, transpiling: balancing-act
New repo detected in active-repos, transpiling: balancing-chemical-equations
New repo detected in active-repos, transpiling: balloons-and-static-electricity
New repo detected in active-repos, transpiling: bamboo
New repo detected in active-repos, transpiling: beers-law-lab
New repo detected in active-repos, transpiling: bending-light
New repo detected in active-repos, transpiling: binder
New repo detected in active-repos, transpiling: blackbody-spectrum
New repo detected in active-repos, transpiling: blast
New repo detected in active-repos, transpiling: brand
New repo detected in active-repos, transpiling: build-a-fraction
New repo detected in active-repos, transpiling: build-a-molecule
New repo detected in active-repos, transpiling: build-a-nucleus
New repo detected in active-repos, transpiling: build-an-atom
New repo detected in active-repos, transpiling: bumper
New repo detected in active-repos, transpiling: buoyancy
New repo detected in active-repos, transpiling: calculus-grapher
New repo detected in active-repos, transpiling: capacitor-lab-basics
New repo detected in active-repos, transpiling: chains
New repo detected in active-repos, transpiling: charges-and-fields
New repo detected in active-repos, transpiling: chipper
New repo detected in active-repos, transpiling: circuit-construction-kit-ac
New repo detected in active-repos, transpiling: circuit-construction-kit-ac-virtual-lab
New repo detected in active-repos, transpiling: circuit-construction-kit-black-box-study
New repo detected in active-repos, transpiling: circuit-construction-kit-common
New repo detected in active-repos, transpiling: circuit-construction-kit-dc
New repo detected in active-repos, transpiling: circuit-construction-kit-dc-virtual-lab
New repo detected in active-repos, transpiling: collision-lab
New repo detected in active-repos, transpiling: color-vision
New repo detected in active-repos, transpiling: concentration
New repo detected in active-repos, transpiling: coulombs-law
New repo detected in active-repos, transpiling: counting-common
New repo detected in active-repos, transpiling: curve-fitting
New repo detected in active-repos, transpiling: decaf
New repo detected in active-repos, transpiling: density
New repo detected in active-repos, transpiling: density-buoyancy-common
New repo detected in active-repos, transpiling: diffusion
New repo detected in active-repos, transpiling: dot
New repo detected in active-repos, transpiling: eating-exercise-and-energy
New repo detected in active-repos, transpiling: energy-forms-and-changes
New repo detected in active-repos, transpiling: energy-skate-park
New repo detected in active-repos, transpiling: energy-skate-park-basics
New repo detected in active-repos, transpiling: equality-explorer
New repo detected in active-repos, transpiling: equality-explorer-basics
New repo detected in active-repos, transpiling: equality-explorer-two-variables
New repo detected in active-repos, transpiling: estimation
New repo detected in active-repos, transpiling: example-sim
New repo detected in active-repos, transpiling: expression-exchange
New repo detected in active-repos, transpiling: faradays-law
New repo detected in active-repos, transpiling: fluid-pressure-and-flow
New repo detected in active-repos, transpiling: forces-and-motion-basics
New repo detected in active-repos, transpiling: fourier-making-waves
New repo detected in active-repos, transpiling: fraction-comparison
New repo detected in active-repos, transpiling: fraction-matcher
New repo detected in active-repos, transpiling: fractions-common
New repo detected in active-repos, transpiling: fractions-equality
New repo detected in active-repos, transpiling: fractions-intro
New repo detected in active-repos, transpiling: fractions-mixed-numbers
New repo detected in active-repos, transpiling: friction
New repo detected in active-repos, transpiling: function-builder
New repo detected in active-repos, transpiling: function-builder-basics
New repo detected in active-repos, transpiling: gas-properties
New repo detected in active-repos, transpiling: gases-intro
New repo detected in active-repos, transpiling: gene-expression-essentials
New repo detected in active-repos, transpiling: geometric-optics
New repo detected in active-repos, transpiling: graphing-lines
New repo detected in active-repos, transpiling: graphing-quadratics
New repo detected in active-repos, transpiling: graphing-slope-intercept
New repo detected in active-repos, transpiling: gravity-and-orbits
New repo detected in active-repos, transpiling: gravity-force-lab
New repo detected in active-repos, transpiling: gravity-force-lab-basics
New repo detected in active-repos, transpiling: greenhouse-effect
New repo detected in active-repos, transpiling: griddle
New repo detected in active-repos, transpiling: hookes-law
New repo detected in active-repos, transpiling: interaction-dashboard
New repo detected in active-repos, transpiling: inverse-square-law-common
New repo detected in active-repos, transpiling: isotopes-and-atomic-mass
New repo detected in active-repos, transpiling: john-travoltage
New repo detected in active-repos, transpiling: joist
New repo detected in active-repos, transpiling: kite
New repo detected in active-repos, transpiling: least-squares-regression
New repo detected in active-repos, transpiling: make-a-ten
New repo detected in active-repos, transpiling: masses-and-springs
New repo detected in active-repos, transpiling: masses-and-springs-basics
New repo detected in active-repos, transpiling: mobius
New repo detected in active-repos, transpiling: models-of-the-hydrogen-atom
New repo detected in active-repos, transpiling: molarity
New repo detected in active-repos, transpiling: molecule-polarity
New repo detected in active-repos, transpiling: molecule-shapes
New repo detected in active-repos, transpiling: molecule-shapes-basics
New repo detected in active-repos, transpiling: molecules-and-light
New repo detected in active-repos, transpiling: my-solar-system
New repo detected in active-repos, transpiling: natural-selection
New repo detected in active-repos, transpiling: neuron
New repo detected in active-repos, transpiling: nitroglycerin
New repo detected in active-repos, transpiling: normal-modes
New repo detected in active-repos, transpiling: number-line-common
New repo detected in active-repos, transpiling: number-line-distance
New repo detected in active-repos, transpiling: number-line-integers
New repo detected in active-repos, transpiling: number-line-operations
New repo detected in active-repos, transpiling: number-play
New repo detected in active-repos, transpiling: ohms-law
New repo detected in active-repos, transpiling: optics-lab
New repo detected in active-repos, transpiling: pendulum-lab
New repo detected in active-repos, transpiling: perennial
New repo detected in active-repos, transpiling: perennial-alias
New repo detected in active-repos, transpiling: ph-scale
New repo detected in active-repos, transpiling: ph-scale-basics
New repo detected in active-repos, transpiling: phet-core
New repo detected in active-repos, transpiling: phet-info
New repo detected in active-repos, transpiling: phet-io
New repo detected in active-repos, transpiling: phet-io-client-guides
New repo detected in active-repos, transpiling: phet-io-test-sim
New repo detected in active-repos, transpiling: phet-io-website
New repo detected in active-repos, transpiling: phet-io-wrapper-arithmetic
New repo detected in active-repos, transpiling: phet-io-wrapper-classroom-activity
New repo detected in active-repos, transpiling: phet-io-wrapper-haptics
New repo detected in active-repos, transpiling: phet-io-wrapper-hookes-law-energy
New repo detected in active-repos, transpiling: phet-io-wrapper-lab-book
New repo detected in active-repos, transpiling: phet-io-wrappers
New repo detected in active-repos, transpiling: phetcommon
New repo detected in active-repos, transpiling: phetmarks
New repo detected in active-repos, transpiling: phettest
New repo detected in active-repos, transpiling: plinko-probability
New repo detected in active-repos, transpiling: projectile-motion
New repo detected in active-repos, transpiling: proportion-playground
New repo detected in active-repos, transpiling: qa
New repo detected in active-repos, transpiling: quadrilateral
New repo detected in active-repos, transpiling: quake
New repo detected in active-repos, transpiling: query-string-machine
New repo detected in active-repos, transpiling: ratio-and-proportion
New repo detected in active-repos, transpiling: reactants-products-and-leftovers
New repo detected in active-repos, transpiling: resistance-in-a-wire
New repo detected in active-repos, transpiling: rosetta
New repo detected in active-repos, transpiling: rutherford-scattering
New repo detected in active-repos, transpiling: scenery
New repo detected in active-repos, transpiling: scenery-phet
New repo detected in active-repos, transpiling: sherpa
New repo detected in active-repos, transpiling: shred
New repo detected in active-repos, transpiling: simula-rasa
New repo detected in active-repos, transpiling: skiffle
New repo detected in active-repos, transpiling: states-of-matter
New repo detected in active-repos, transpiling: states-of-matter-basics
New repo detected in active-repos, transpiling: studio
New repo detected in active-repos, transpiling: sun
New repo detected in active-repos, transpiling: tambo
New repo detected in active-repos, transpiling: tandem
New repo detected in active-repos, transpiling: tangible
New repo detected in active-repos, transpiling: tappi
New repo detected in active-repos, transpiling: tasks
New repo detected in active-repos, transpiling: trig-tour
New repo detected in active-repos, transpiling: twixt
New repo detected in active-repos, transpiling: under-pressure
New repo detected in active-repos, transpiling: unit-rates
New repo detected in active-repos, transpiling: utterance-queue
New repo detected in active-repos, transpiling: vector-addition
New repo detected in active-repos, transpiling: vector-addition-equations
New repo detected in active-repos, transpiling: vegas
New repo detected in active-repos, transpiling: vibe
New repo detected in active-repos, transpiling: wave-interference
New repo detected in active-repos, transpiling: wave-on-a-string
New repo detected in active-repos, transpiling: waves-intro
New repo detected in active-repos, transpiling: weddell
New repo detected in active-repos, transpiling: wilder
New repo detected in active-repos, transpiling: xray-diffraction
10:53:21 AM, 117 ms: ..\number-play\js\compare\view\CompareCountingTypeRadioButtonGroup.js (deleted)
10:53:21 AM, 70 ms: ..\geometric-optics\js\lens\view\LensKeyboardHelpContent.js (deleted)
10:53:21 AM, 95 ms: ..\geometric-optics\js\mirror\view\MirrorKeyboardHelpContent.js (deleted)
10:53:23 AM, 28 ms: ..\phet-io\js\PhetioStateEngine.js (deleted)

 Michael ~/PHET/git/chipper (master)
 $ ^[[A
bash: $'\E[A': command not found

 Michael ~/PHET/git/chipper (master)
 $ node js/scripts/transpile --watch
11:06:34 AM, 395 ms: ..\balloons-and-static-electricity\js\balloons-and-static-electricity\BASEA11yStrings.js
11:06:34 AM, 76 ms: ..\balloons-and-static-electricity\js\balloons-and-static-electricity\view\BASEKeyboardHelpContent.js
11:06:35 AM, 244 ms: ..\density-buoyancy-common\js\common\view\DensityBuoyancyScreenView.js
11:06:36 AM, 46 ms: ..\faradays-law\js\faradays-law\view\FaradaysLawKeyboardHelpContent.js
11:06:36 AM, 69 ms: ..\fourier-making-waves\js\waveGame\view\WaveGameLevelNode.js
11:06:37 AM, 55 ms: ..\geometric-optics\js\common\view\GOKeyboardHelpContent.ts
11:06:37 AM, 74 ms: ..\geometric-optics\js\common\view\GORulerNode.ts
11:06:37 AM, 94 ms: ..\geometric-optics\js\common\view\GOScreenView.ts
11:06:37 AM, 35 ms: ..\geometric-optics\js\geometricOpticsStrings.ts
11:06:37 AM, 35 ms: ..\geometric-optics\js\lens\LensScreen.ts
11:06:37 AM, 42 ms: ..\geometric-optics\js\lens\view\LensScreenView.ts
11:06:37 AM, 37 ms: ..\geometric-optics\js\mirror\MirrorScreen.ts
11:06:37 AM, 28 ms: ..\geometric-optics\js\mirror\view\MirrorScreenView.ts
11:06:39 AM, 29 ms: ..\number-play\js\common\model\NumberPlayModel.ts
11:06:39 AM, 41 ms: ..\number-play\js\common\view\NumberPlayScreenView.js
11:06:39 AM, 35 ms: ..\number-play\js\common\view\ObjectsAccordionBox.js
11:06:39 AM, 57 ms: ..\number-play\js\common\view\OnesPlayAreaNode.js
11:06:39 AM, 27 ms: ..\number-play\js\compare\model\CompareCountingType.ts
11:06:39 AM, 31 ms: ..\number-play\js\compare\model\CompareModel.js
11:06:39 AM, 30 ms: ..\number-play\js\compare\model\ComparePlayArea.js
11:06:39 AM, 31 ms: ..\number-play\js\compare\model\ComparePlayObjectType.ts
11:06:39 AM, 34 ms: ..\number-play\js\compare\view\CompareAccordionBox.js
11:06:39 AM, 30 ms: ..\number-play\js\compare\view\CompareCountingTypeRadioButtonGroup.js
11:06:39 AM, 34 ms: ..\number-play\js\game\model\CountingGameLevel.ts
11:06:39 AM, 36 ms: ..\number-play\js\game\model\NumberPlayGameLevel.ts
11:06:39 AM, 30 ms: ..\number-play\js\game\model\NumberPlayGameType.ts
11:06:39 AM, 28 ms: ..\number-play\js\game\model\SubitizeGameLevel.ts
11:06:39 AM, 27 ms: ..\number-play\js\game\model\SubitizeObjectType.ts
11:06:39 AM, 77 ms: ..\number-play\js\game\model\Subitizer.ts
11:06:39 AM, 35 ms: ..\number-play\js\game\view\CountingGameLevelNode.ts
11:06:39 AM, 41 ms: ..\number-play\js\game\view\NumberPlayGameLevelNode.ts
11:06:39 AM, 34 ms: ..\number-play\js\game\view\NumberPlayGameLevelSelectionNode.ts
11:06:39 AM, 37 ms: ..\number-play\js\game\view\SubitizerNode.ts
11:06:39 AM, 37 ms: ..\number-play\js\lab\view\LabScreenView.js
11:06:40 AM, 51 ms: ..\phet-io\js\PhetioStateEngine.js
11:06:40 AM, 37 ms: ..\quadrilateral\js\quadrilateral\model\QuadrilateralSoundOptionsModel.ts
11:06:40 AM, 43 ms: ..\quadrilateral\js\quadrilateral\view\ParallelsVolumeSoundView.ts
11:06:40 AM, 38 ms: ..\quadrilateral\js\quadrilateral\view\QuadrilateralSoundOptionsNode.ts
11:06:40 AM, 29 ms: ..\quadrilateral\js\quadrilateral\view\QuadrilateralSoundView.ts
11:06:40 AM, 47 ms: ..\quadrilateral\js\quadrilateral\view\QuartetSideSoundView.ts
11:06:40 AM, 30 ms: ..\ratio-and-proportion\js\common\view\BackgroundColorHandler.ts
11:06:40 AM, 37 ms: ..\ratio-and-proportion\js\common\view\CueDisplay.ts
11:06:40 AM, 65 ms: ..\ratio-and-proportion\js\common\view\describers\RatioDescriber.ts
11:06:40 AM, 30 ms: ..\ratio-and-proportion\js\common\view\RAPColors.ts
11:06:41 AM, 34 ms: ..\ratio-and-proportion\js\create\view\CreateScreenIcon.ts
11:06:41 AM, 50 ms: ..\ratio-and-proportion\js\create\view\CreateScreenSummaryNode.ts
11:06:41 AM, 41 ms: ..\ratio-and-proportion\js\create\view\MyChallengeAccordionBox.ts
11:06:41 AM, 37 ms: ..\ratio-and-proportion\js\create\view\TickMarkRangeComboBoxNode.ts
11:06:41 AM, 34 ms: ..\ratio-and-proportion\js\discover\view\ChallengeComboBoxItem.ts
11:06:41 AM, 34 ms: ..\ratio-and-proportion\js\discover\view\DiscoverScreenSummaryNode.ts
11:06:41 AM, 51 ms: ..\scenery\js\listeners\KeyboardDragListener.js
11:06:41 AM, 44 ms: ..\scenery-phet\js\keyboard\help\KeyboardHelpSection.js
Finished initial transpilation in 10920ms
Watching...


@zepumph
Copy link
Member Author

zepumph commented Jan 4, 2022

Tagging @samreid so he (the author), is aware of the changes. I'll check back on this in a few days to see if anything has changed.

@samreid samreid self-assigned this Jan 4, 2022
@zepumph
Copy link
Member Author

zepumph commented Jan 5, 2022

On slack @jessegreenberg said:

I am noticing that transpile.js isn't picking up changes from pulling, it has to be restarted after a pull to pick up those changes. Should I make an issue?

I think that sounds very similar to this, but I wonder if he already had pulled in this change. @jessegreenberg were you experiencing this after pulling, and restarting the transpiler since yesterday?

@jessegreenberg
Copy link
Contributor

I do not have that change on my local copy, Ill pull and see if the problem goes away.

jessegreenberg added a commit to phetsims/quadrilateral that referenced this issue Jan 5, 2022
@jessegreenberg
Copy link
Contributor

I am not sure if this is a complete test, but I checked out quadrilateral in a different location on my machine, made a test commit there, pulled that change in my normal working location, and then verified that transpile.js picked up the change. This much was working well!

@jessegreenberg jessegreenberg removed their assignment Jan 5, 2022
jessegreenberg added a commit to phetsims/quadrilateral that referenced this issue Jan 5, 2022
@zepumph
Copy link
Member Author

zepumph commented Jan 5, 2022

I would add that when I pulled all this morning, I didn't not have to restart my transpiler. I believe this is fixed. @samreid feel free to close.

@zepumph zepumph removed their assignment Jan 5, 2022
@jessegreenberg
Copy link
Contributor

jessegreenberg commented Jan 6, 2022

I ran into an issue with pull again, I don't know if it should be noted here or in a new issue. I did the following:

  • Started transpiler.js
  • ran perennial/bin/pull-all.sh
  • Tried to run greenhouse-effect

I saw this error in the dev tools:

GET http://localhost:8080/chipper/dist/js/greenhouse-effect/js/common/model/EnergyAbsorbingEmittingLayer.js net::ERR_ABORTED 404 (Not Found)

Then I restarted transpiler.js and the issue went away.

@jessegreenberg
Copy link
Contributor

jessegreenberg commented Jan 7, 2022

As I pulled all this morning, I saw the output from transpile.js indicate that it was transpiling from changes that came in during the pull. I didn't encounter an error like #1179 (comment) today.

UPDATE: When I ran john-travoltage I didn't see any errors. But when I ran gravity-force-lab-basics I saw
image

Restarting transpile.js made the problem go away.

UPDATE: In the output of transpile.js during the pull I see that NumberPicker.js and Enumeration.js were (deleted) but not transpiled again
image

Other files have a (deleted) followed by another transpile
image

@jessegreenberg
Copy link
Contributor

I just noticed a similar issue with git stash. In a change set I created a new file and then used it. Then I stashed my changes. Somehow the file was still used but not found in dist. I had to restart transpile.js to get it to stop looking for the stashed file.

@zepumph
Copy link
Member Author

zepumph commented Jan 11, 2022

This morning I had to restart my transpiler before it recompiled all the files that came in from pulling. Perhaps I need to do a bit of research in a test repo about how git pull modifies files. Maybe transpile needs to watch git operations somehow.

@zepumph
Copy link
Member Author

zepumph commented Jan 11, 2022

I think this is an inherent issue with fs.watch. I found nodejs/node#5039 which led me to https://github.com/paulmillr/chokidar. Perhaps a different watch process would improve the experience. I want to poke around with this since I can so consistently reproduce the issues around git pull. I bet git stash will be an easier testing situation. Thanks @jessegreenberg!

@zepumph zepumph self-assigned this Jan 11, 2022
@samreid
Copy link
Member

samreid commented Jan 11, 2022

The first version of this transpiler used chokidar, but I ran into so many problems that went away when I switched to fs.watch. But maybe windows will be better off with chokidar?

@zepumph
Copy link
Member Author

zepumph commented Jan 11, 2022

Oh! Good to know, hmmm, I'm not really sure then.

@jessegreenberg
Copy link
Contributor

I just noticed a similar case to this when running grunt modulify, Transpiler.js had to be restarted to pick up the change.

@zepumph
Copy link
Member Author

zepumph commented May 26, 2022

I still am restarting my transpiler upon git operations (mostly pull).

@zepumph zepumph removed their assignment May 26, 2022
@samreid samreid removed their assignment Aug 3, 2022
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

3 participants