nx
                                
                                
                                
                                    nx copied to clipboard
                            
                            
                            
                        nx does not find projects with `__something__` in folder name
Current Behavior
After the removal of the workspace.json it seems that nx now has problems finding projects that have __ at the start of the name and at the end of their name, or maybe other characters are excluded also. The project.json name doesn't seem to be effected though.
_generated // works
__generated // works
__generated_ // works
__generated__ // doesn't work
__generated___ //works
Expected Behavior
- project resolution should work independent of the folder names
 - there should be a schema of what folder names are allowed
 - there should be a warning of some kind that there is a project with a folder name not allowed
 
GitHub Repo
No response
Steps to Reproduce
- name a libs folder with 
__generated__ - nx show projects
 
Nx Report
Node : 16.14.2
   OS   : win32 x64
   pnpm : 7.27.0
   nx                      : 15.8.6
   @nrwl/js                : 15.8.6
   @nrwl/jest              : 15.8.6
   @nrwl/linter            : 15.8.6
   @nrwl/workspace         : 15.8.6
   @nrwl/cli               : 15.8.6
   @nrwl/cypress           : 15.8.6
   @nrwl/devkit            : 15.8.6
   @nrwl/eslint-plugin-nx  : 15.8.6
   @nrwl/nest              : 15.8.6
   @nrwl/node              : 15.8.6
   typescript              : 4.9.5
   ---------------------------------------
   Community plugins:
   @jscutlery/semver : 2.30.1
Failure Logs
No response
Additional Information
This bug was introduced with version 15.8.0-beta.7
Any progress on this issue?
Still an issue in 16.3.2
might be related to #17426 since there is also a problem with resolution of the path in windows.
Ok the error is even more specific. the folder with in the libs/* sub folder structure cannot start with a g
libs/shared/rgraphql-schema-types
libs/shared/graphql-schema-types
Additionally, when I rename the folder I have to execute nx reset too.
guess what, after trying to do the same thing again with a different name, I am unable to reproduce a working example, now again that project fails to be found and I still have no idea why. and why only that single one.
So what I did is:
- Move libs/shared/generated to libs/shared/graphql-schema-types in nx 15.6.3
 - Migrated to latest nx
 - run nx show projects, project does not show
 - Renamed the folder in the explorer to libs/shared/rgraphql-schema-types
 - run nx show projects, project does show
 - Renamed the folder in the explorer to libs/shared/graphql-schema-types
 - run nx show projects, project does not show
 
Ok I think I found the error. https://github.com/nrwl/nx/blob/6dd652095c07cf26635b5e583249b0bdaa400902/packages/nx/src/utils/ignore.ts#L17 This change seem to have worked in the way that the actually .gitignore is now regarded in the acquiring of projects which before didn't seem to work. I generate files in the project which should be ignored but not the project itself, but since it showed up in the .gitignore since 15.8.0-beta.7 that seems to be an issue. is it possible to tell nx not to ignore any stuff from .gitignore?
so I guess it is a bug because according to https://nx.dev/concepts/affected#ignoring-files-from-affected-commands
affected should ignore those but not the graph builder @AgentEnder
Hey @hinogi 👋, I'm going to close this out. We have made the decision that projects should never come from files listed in .gitignore, or .nxignore. You may be able to get around this by adding !path/to/some/__project__ in .nxignore.
Fine with me, I removed all references from the gitignore just in case :D So it works for me. I guess I have to fine grain the glob a bit better.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.