Skip to content

Conversation

@dfreeman
Copy link
Member

Excluding node_modules from watching was causing changes in linked addons not to be picked up. Removing that element from the exclude patterns fixes the problem, but I'm not positive why it was in there in the first place.

@tansongyang do you remember the context there? Were there Windows-related issues with allowing the watcher to include node_modules?

@tansongyang
Copy link
Contributor

tansongyang commented May 25, 2018

@dfreeman I probably just erroneously assumed that that was the correct thing to do. I don't recall specific Windows issues. I'm happy to test this PR on Windows, but I won't be available to do that until Sunday at the earliest.

@dfreeman
Copy link
Member Author

Thanks @tansongyang! I'll be gone for the weekend without much internet access until Monday night anyway — if you do get the chance to give it a try at some point, that would be great 🙂

@dfreeman
Copy link
Member Author

Looks like this is causing issues on Travis — ENOSPC in this context generally means the OS cap on watch handles has been reached. We could look at raising that in our Travis config, but it may indicate that we need to take a different tack rather than allowing all of node_modules under the watcher.

@tansongyang
Copy link
Contributor

I did some light testing and so far have not found any problems on Windows.

Regarding an alternate solution to allowing all of node_modules: Is there already a concept of a configuration file for e-c-ts? .ember-cli-typescript or something? If so, we could consider adding a setting that allows users to add folders to watch. If it doesn't exist, we might consider adding it.

@dfreeman
Copy link
Member Author

dfreeman commented Jun 6, 2018

We likely do want to allow users to customize their ignored directories at some point (see #216 for an example use case), but for this particular issue I think the straightforward solution is to customize our ignore regex per watched root.

If we ignore node_modules relative to the watched directory rather than always relative to the project root, then when tsc calls watchDirectory('<project-root>/node_modules/linked-addon'), we'll ignore linked-addon's node_modules rather than that addon itself.

@dfreeman dfreeman mentioned this pull request Jun 18, 2018
@dfreeman
Copy link
Member Author

Superseded by #222.

@dfreeman dfreeman closed this Jun 18, 2018
@dfreeman dfreeman deleted the dont-ignore-node-modules branch June 18, 2018 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants