Skip to content
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

fix(core): fix dependent projects for watch #14170

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

Cammisuli
Copy link
Member

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Jan 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Jan 11, 2023 at 3:19PM (UTC)

@nx-cloud
Copy link

nx-cloud bot commented Jan 5, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit fdb7dba. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


⌛ The following targets are in progress

✅ Successfully ran 8 targets

Sent with 💌 from NxCloud.

Copy link
Member

@AgentEnder AgentEnder 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, but we can avoid some extra iterations pretty easily if we use a set from the get go.

@@ -58,7 +58,7 @@ export function notifyFileWatcherSockets(
const watchedProjects = [...config.watchProjects];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const watchedProjects = [...config.watchProjects];
const watchedProjects = new Set()

Comment on lines 61 to 64
for (const project of config.watchProjects) {
watchedProjects.push(
...findAllProjectNodeDependencies(
project,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (const project of config.watchProjects) {
watchedProjects.push(
...findAllProjectNodeDependencies(
project,
for (const project of config.watchProjects) {
watchedProjects.add(project)
for (const dep of findAllProjectNodeDependencies(...)) {
watchedProjects.add(dep)
}
}

@Cammisuli Cammisuli merged commit 66df55f into nrwl:master Jan 11, 2023
@Cammisuli Cammisuli deleted the fix_watch_dependent_projects branch January 11, 2023 17:12
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2023
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.

3 participants