Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes an issue I was experiencing on my Windows development environment (though I do not believe it occurs on other environments).
The problem I had was that when running a dev server with
yarn dev:web
,cargo watch
would constantly refresh the app. Runningcargo watch --debug
revealed that it was being caused by changes detected in thecore/prisma
directory, which seemed to coincide with database writes.The rust-lang GitHub page has an issue discussing this problem and notes that
cargo watch
triggers on any changes to the directories it is watching (not just source files) unless that file is covered by the .gitignore. Although the .gitignore does cover*.db*
, it seems that writes to thecore/prisma
directory generally were triggering recompiles.What I ended up doing was putting the
dev.db
etc. files incore/prisma/dev
instead, then added that to the .gitignore directly. It worked - no more random recompiles on Windows. Admittedly, this is a bit more cluttered than before, but I think it's worthwhile for me at least, and might help other devs in the future.I also added indentation to a few doc comments because it made clippy mad.