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

chore(core): introduce getProjectForPath util #13362

Closed
wants to merge 1 commit into from

Conversation

FrozenPandaz
Copy link
Collaborator

Current Behavior

There are many versions of functions that get the project which a file or path pertains to.

Expected Behavior

There is 1 function used to get the project which a file or path pertains to: getProjectForPath

Related Issue(s)

Closes #13349

@vercel
Copy link

vercel bot commented Nov 23, 2022

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

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Nov 23, 2022 at 6:30PM (UTC)

@FrozenPandaz
Copy link
Collaborator Author

Closed by #13364

@FrozenPandaz FrozenPandaz deleted the refactor-get-project branch November 24, 2022 16:09
@luchsamapparat
Copy link
Contributor

luchsamapparat commented Dec 6, 2022

It seems that this changed causes issues on my Windows machine. After updating from Nx 15.2.1 to 15.3.0, createGlobPatternsForDependencies fails with a warning:

WARNING: There was no ProjectGraph available to read from, returning an empty array of glob patterns

While debugging I noticed, that createGlobPatternsForDependencies tries to access the projectGraph map with Windows-style backslashes...

image

... while the keys of that map contain regular slashes

image

For comparison, the previous implementation used getProjectNameFromDirPath which normalizes the path before using it:

image

@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 16, 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.

None yet

2 participants