Open cainlevy opened 1 month ago
I bisected the problem by stepping through versions with the following commands:
npx nx migrate $version
npm i
rm -r .nx
npx nx reset
npx nx run validators:lint
The problem begins with 19.5.0. It does not exist with 19.4.4.
~Now I am getting the issue with a clean upgrade to 19.4.4 and even 19.0.8.~
~I can't figure out why this appears non-deterministic.~
My last comment was caused by confusion from a separate issue: https://github.com/nrwl/nx/issues/26675
When I control for this second bug, I once again see the fileMap
problem appear with v19.5.0.
Current Behavior
After upgrading to ~v19.7.4~ v19.5.0, the
@nx/dependency-checks
rule believes that some of my packages have obsolete dependencies, while in fact the dependencies are referenced by existing code and are properly included with ~v18.3.1~ v19.4.4.So far, the problem appears to be that the files importing the dependencies are no longer included in the file-map.json and thus are not parsed for dependencies. The pattern I am observing is that file-map.json does not include the contents of
src/lib
for any of my packages, and this will miss any dependencies referenced by those files.NX ~v19~ v19.5.0 shows the following in
fileMap.projectFileMap.validators
:NX ~v18~ v19.4.4 includes more:
Expected Behavior
I expect the project-graph.json will reference all files in my packages and be aware of all dependencies used by those projects.
GitHub Repo
No response
Steps to Reproduce
test
package withpackages/test/src/lib/file.ts
packages/test/package.json
and import it fromfile.ts
@nx/dependency-checks
lintpackages/test/src/lib/file.ts
is missing from.nx/workspace-data/project-graph.json
and from.nx/workspace-data/file-map.json
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response