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

findImports() excludes files based on .gitignore files outside of the repository #29413

Open
1 of 4 tasks
rene-leanix opened this issue Dec 19, 2024 · 0 comments
Open
1 of 4 tasks

Comments

@rene-leanix
Copy link

rene-leanix commented Dec 19, 2024

Current Behavior

The native findImports() (of nx-darwin-arm64 in my case) seems to include .gitignore-files outside of the repository from the parent folder when determining which files to exclude from the dependency computation. This can lead to incorrect project-dependencies and failing builds.

Expected Behavior

Only .gitignore-files within the current repository are taken into account and, of course, applied downstream.

GitHub Repo

https://github.com/rene-leanix/nx-20.2.2-dependency-bug

Steps to Reproduce

  1. Add a .gitignore file with the line classes to the parent folder of the example repository.
  2. Executing npm run build now fails.
  3. Executing npm run graph does not show any more that lib1 depends on lib2.

Nx Report

Node           : 18.19.1
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 10.2.4

nx                     : 20.2.2
@nx/js                 : 20.2.2
@nx/jest               : 20.2.2
@nx/eslint             : 20.2.2
@nx/workspace          : 20.2.2
@nx/angular            : 20.2.2
@nx/devkit             : 20.2.2
@nx/module-federation  : 20.2.2
@nx/plugin             : 20.2.2
@nx/web                : 20.2.2
@nx/webpack            : 20.2.2
typescript             : 5.6.3

Failure Logs

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@rene-leanix rene-leanix changed the title findImports() excludes files based on .gitignore files _outside_ of the repository findImports() excludes files based on .gitignore files outside of the repository Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant