Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Fix Rust Live Preview #699

Merged
merged 17 commits into from
Oct 23, 2019
Merged

Fix Rust Live Preview #699

merged 17 commits into from
Oct 23, 2019

Conversation

gabbifish
Copy link
Contributor

@gabbifish gabbifish commented Sep 24, 2019

Fixes #618. The problem with Rust live preview was that it would keep on detecting changes as the rust-wasm toolchain built the wasm worker, meaning that changes to source code would trigger a cascade of file changes and thus, a cascade of file detection events and updates sent to the preview service. (So the problem wasn't dotfiles, afaik)...

This PR filters target/build paths for rust-wasm so they are not watched for file changes; namely, this includes the pkg, target, and worker-generated directories.

This has been tested on a Linux computer with Javascript, Webpack, and Rust workers and works as expected. Additional manual/real-world testing of this would be appreciated, especially on other operating systems (Mac, Windows)!

This PR also fixes watching of dotfiles for rust live preview.

Copy link
Contributor

@EverlastingBugstopper EverlastingBugstopper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! works on macos

@gabbifish gabbifish merged commit 9c5b9fc into master Oct 23, 2019
@gabbifish gabbifish deleted the gabbi/fix-#618 branch October 23, 2019 23:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(rustwasm template) wrangler preview --watch enters "detected changes" loop
4 participants