Open a-rasin opened 3 months ago
Also I think at some point parcel seems to stops doing any building on the terminal as well.
I am willing to try and work on this or at least debug it further using the source code. Any pointers for where to look or any potential causes would be very helpful.
There are three stages where it could break:
respondToFSEvents
is responsible for determining what has to be recomputed:
https://github.com/parcel-bundler/parcel/blob/c3505e59a96c3c95aea16954883afe059b8e6da8/packages/core/core/src/RequestTracker.js#L844
(Then, for example @parcel/transformer-js
and @parcel/packager-js
should rerun).For more logging inside Parcel (in the functions I referenced above), you can add console.log statements to e.g. node_modules/@parcel/core/lib/Parcel.js
and node_modules/@parcel/transformer-js/lib/JSTransformer.js
. Run it as yarn parcel build ... | cat
to prevent log message from being cleared after builds.
Would it be possible to do a release that adds logging behind a flag (verbose or an env flag)? I can yarn patch it, but it might be more helpful to have logs that contain the information you would need/want for a more detailed bug report.
Ok, so something I noticed. I'm trying out emacs this is my second day using it and I noticed that parcel works with it. Previously I was using neovim. I'm guessing the way that neovim saves files doesn't trigger a rebuild at least not in the correct manner.
@a-rasin Try setting the following in your neovim configuration:
set backupcopy=yes
That changes how neovim saves a file (basically creating a copy and replacing the whole file with the above configuration).
🐛 bug report
Changes aren't getting picked up after the first save. I need to constantly clear the cache and rerun parcel. Other team members can run it fine (only hmr doesn't work for them) but for me the page in the browser doesn't change. Even with reloading and hard reloading notihng changes. I can see parcel doing some work building something but changes are not reflected in the browser unless I clear the cache and rerun parcel. This sounds extremely similar to #5660 but saving a file with echo changes nothing so the cause seems slightly different
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
Rebuild on every save and at least by refreshing the browser I get the latest code.
😯 Current Behavior
After one or two saves the page in the browser remains the same literally nothing changes. Parcel is building something in the terminal but it is not reflected in the browser even if I refresh.
🔦 Context
Been experiencing this issue probably for a year now it used to stop picking up changes after about 4 edits per file but now it reduced to 1 and it's driving me nuts my productivity is destroyed
💻 Code Sample
Sorry can't share the code
🌍 Your Environment