-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Elm: typechecking newly added imported file doesn't trigger reload #2147
Comments
cc @benthepoet |
Could be an upstream bug in https://github.com/NoRedInk/find-elm-dependencies#usage, need to test that next time it happens. |
Got this again today. @DeMoorJasper any tips how to debug how parcel picks up file changes? |
The problem might be that there is an error:
|
I did some research on this and it seems the issue is that when the compile process throws an error, all processing of the asset halts, and any collected information such as dependencies is thrown away. At a high level, this happens in Bundler.js on line 556, and dependencies aren't watched until line 578. There are a few ways to potentially fix this, but I think the ideal situation would be to let I'd be happy to try tackling this problem, but I want to make sure I'm doing work that makes sense in the context of the larger project. @DeMoorJasper or @devongovett - What's the best way to approach this? I can just start slinging code and open a PR, but if there's a particular approach you think would be best, I'm happy to go that route. |
This allows compiled langauges like Elm that handle their own dependency compilation to set up watchers for dependencies so that hot-reload continues to work due to errors in new depdenencies. Fixes parcel-bundler#2147.
This allows compiled langauges like Elm that handle their own dependency compilation to set up watchers for dependencies so that hot-reload continues to work due to errors in new depdenencies. Fixes parcel-bundler#2147.
This allows compiled langauges like Elm that handle their own dependency compilation to set up watchers for dependencies so that hot-reload continues to work due to errors in new depdenencies. Fixes parcel-bundler#2147.
This allows compiled langauges like Elm that handle their own dependency compilation to set up watchers for dependencies so that hot-reload continues to work due to errors in new depdenencies. Fixes parcel-bundler#2147.
This allows compiled langauges like Elm that handle their own dependency compilation to set up watchers for dependencies so that hot-reload continues to work due to errors in new depdenencies. Fixes parcel-bundler#2147.
) * Defer throwing asset errors until after dependencies are handled. This allows compiled langauges like Elm that handle their own dependency compilation to set up watchers for dependencies so that hot-reload continues to work due to errors in new depdenencies. Fixes #2147. * Fix Elm error generation. I'm not entirely sure why this fix is necessary, but without it a compile error during a rebuild results in Parcel printing "Unknown error" instead of anything useful. Since we are intecepting the error though, we can also remove redundant stack information. * Add test for tracking dependencies on error * revert hmr-runtime changes * Transform all errors in Pipeline.process. This prevents error data from being lost when Pipeline is run via `WorkerFarm`. * Separate error-depenency test input from basic Elm tests. * Update ElmAsset.js
Hi there. Sorry for commenting on this closed issue, but I'm not sure if I should raise a new issue since this feature isn't released yet. I still experience this bug even after trying the fork mentioned in #2475 (@domenkozar: Did you do anything specific to make it work? Could you look at the example repo and see if you're able to reproduce it too?). Steps to reproduce:
See this example repo and this demo video. Any suggestions on what I can do to solve this problem? Thanks a bunch! |
How did you install the fork? To valifate you're using correct ckde, you should not see duplicate elm errors in the logs. |
I installed it by using npm install (and deleting node modules and
reinstall to make sure I didn't have conflicting versions).
The thing is that I don't have compilation errors from Elm. The code
actually compiles, but I have to trigger a save on Main.elm for the
compile+hot reload to trigger.
…On Wed, Jan 23, 2019, 02:35 Domen Kožar ***@***.***> wrote:
How did you install the fork? To valifate you're using correct ckde, you
should not see duplicate elm errors in the logs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2147 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFK96zD-wUmC2gYO359ZetLKkTgGF7s6ks5vF7xXgaJpZM4Xcq0G>
.
|
I can reproduce on your repository, but for me it works well with the same package.json pins. Not sure yet what's going on. |
Ah you're missing |
This updates projects to use a fork of parcel that includes a fix for parcel-bundler/parcel#2147 once that fix is relased in the official parcel package, we should switch back, and open a PR against parcel-bundler-fork to notify users to update their dependencies.
This updates projects to use a fork of parcel that includes a fix for parcel-bundler/parcel#2147 once that fix is relased in the official parcel package, we should switch back, and open a PR against parcel-bundler-fork to notify users to update their dependencies.
This is now fixed in 1.12 (although changelog doesn't mention that). |
) * Defer throwing asset errors until after dependencies are handled. This allows compiled langauges like Elm that handle their own dependency compilation to set up watchers for dependencies so that hot-reload continues to work due to errors in new depdenencies. Fixes #2147. * Fix Elm error generation. I'm not entirely sure why this fix is necessary, but without it a compile error during a rebuild results in Parcel printing "Unknown error" instead of anything useful. Since we are intecepting the error though, we can also remove redundant stack information. * Add test for tracking dependencies on error * revert hmr-runtime changes * Transform all errors in Pipeline.process. This prevents error data from being lost when Pipeline is run via `WorkerFarm`. * Separate error-depenency test input from basic Elm tests. * Update ElmAsset.js
) * Defer throwing asset errors until after dependencies are handled. This allows compiled langauges like Elm that handle their own dependency compilation to set up watchers for dependencies so that hot-reload continues to work due to errors in new depdenencies. Fixes #2147. * Fix Elm error generation. I'm not entirely sure why this fix is necessary, but without it a compile error during a rebuild results in Parcel printing "Unknown error" instead of anything useful. Since we are intecepting the error though, we can also remove redundant stack information. * Add test for tracking dependencies on error * revert hmr-runtime changes * Transform all errors in Pipeline.process. This prevents error data from being lost when Pipeline is run via `WorkerFarm`. * Separate error-depenency test input from basic Elm tests. * Update ElmAsset.js
🐛 bug report
In file B, importing a new file A that doesn't initially typecheck doesn't trigger reloads on subsequent changes.
🎛 Configuration (.babelrc, package.json, cli command)
Barebones elm project.
🤔 Expected Behavior
When file A is saved, parcel reloads.
😯 Current Behavior
Nothing happens when saving file A, one needs to save file B.
💁 Possible Solution
🌍 Your Environment
The text was updated successfully, but these errors were encountered: