-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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): readRawWorkspaceJson should keep workspace cache up to date #12528
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
// if (!staticFSWorkspace) { | ||
const staticFSWorkspace = buildWorkspaceConfigurationFromGlobs( | ||
nxJson, | ||
[...globForProjectFiles(tree.root, nxJson)], | ||
(file) => readJson(tree, file) | ||
); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't just remove this imho, this function gets called frequently when a generator calls readProjectConfiguration
and the glob op is .5 second each call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I revert that bunch of tests fails.
Could this mean that those tests were faulty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem occurs because the workspace gets cached between test runs.
So depending on the order of invocation projects.size
has a different value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this discussion was resolved, merging it in
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. |
Current Behavior
Running migrations that use workspace configuration (using
readRawWorkspaceJson
) on the clean repo (with no files changed) returns no projects.Expected Behavior
Workspace configuration (using
readRawWorkspaceJson
) from devkit should return all projects regardless of the state of the git.Related Issue(s)
Fixes #