Skip to content

[fix] don't watch outDir except generated #4997

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

Merged
merged 8 commits into from
May 20, 2022
Merged

[fix] don't watch outDir except generated #4997

merged 8 commits into from
May 20, 2022

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented May 20, 2022

Fixes error on Windows CI

@changeset-bot
Copy link

changeset-bot bot commented May 20, 2022

🦋 Changeset detected

Latest commit: 95e2fc3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Conduitry

This comment was marked as resolved.

@benmccann benmccann changed the title [fix] don't watch .svelte-kit directory [fix] don't watch generated types directory May 20, 2022
@Rich-Harris
Copy link
Member

Nice! Any theory as to why ignoring the entire outDir doesn't work?

@Rich-Harris
Copy link
Member

Okay, looking at the failures more closely (after you fixed exclude to ignored in 853d982), they were just flakiness rather than a 'proper' failure.

I think what we want to do is ignore the entire outDir except for the generated directory (I tried ignoring the entire outDir, but then it doesn't pick up changes to the route manifest, e.g. if you navigate to /unknown and then created src/routes/unknown.svelte, you need to watch generated or it won't refresh to that page)

@benmccann
Copy link
Member Author

Cool. I agree with that, but didn't know about the ! syntax. The change looks good to me!

The only other thing I debated was having a constant for the generated directory, but there's already a few other places throughout the codebase where we've used the string, so arguably could wait for another PR

'@sveltejs/kit': patch
---

[fix] don't watch generated types directory
Copy link
Member

Choose a reason for hiding this comment

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

The changeset police is here to remind you to update your changeset before you jubilantly/exhaustedly merge this.

@Rich-Harris Rich-Harris changed the title [fix] don't watch generated types directory [fix] don't watch outDir except generated May 20, 2022
@Rich-Harris Rich-Harris merged commit e70e542 into master May 20, 2022
@Rich-Harris Rich-Harris deleted the less-watching branch May 20, 2022 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants