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

feat(core): add WorkspaceContext class #18999

Merged

Conversation

Cammisuli
Copy link
Member

@Cammisuli Cammisuli commented Sep 5, 2023

Current Behavior

There are certain points of the nx project graph life cycle where we keep trying to walk the directory to get information. Particularly for project configurations and file hashes.

Expected Behavior

There is now one central point where the file system (with respecting .gitignores and .nxignore) is stored in memory. This allows following calls to hit the memory file system, rather than have to traverse the system each time.

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Sep 5, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Sep 12, 2023 9:20pm

@Cammisuli Cammisuli force-pushed the feature/nxc-2-nx-workspace-context-class branch 5 times, most recently from 20f147b to c1bee5b Compare September 7, 2023 18:42
@Cammisuli Cammisuli marked this pull request as ready for review September 7, 2023 20:09
@Cammisuli Cammisuli force-pushed the feature/nxc-2-nx-workspace-context-class branch 2 times, most recently from 79fb42e to 9b7fc60 Compare September 12, 2023 01:35
@Cammisuli Cammisuli force-pushed the feature/nxc-2-nx-workspace-context-class branch from 9b7fc60 to 5a5e012 Compare September 12, 2023 21:20
@@ -437,6 +435,14 @@ class TaskHasherImpl {
return partialHashes;
}

private hashFiles(files: string[]): Map<string, string> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's rename this to hashOutputFile in a followup PR so that people are less likely to use this for getting hashes of workspace files.

@FrozenPandaz FrozenPandaz merged commit 537d7eb into nrwl:master Sep 13, 2023
3 checks passed
@FrozenPandaz
Copy link
Collaborator

Nice job :) This is awesome!

@Cammisuli Cammisuli deleted the feature/nxc-2-nx-workspace-context-class branch September 13, 2023 13:58
@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 Sep 19, 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