microsoft/rushstack

[rush] Error "Symlink targets not under folder xxx" occurs even problematic files are configured to be excluded via patternsToExclude

EscapeB opened this issue · 1 comments

Summary

We add a new feature in PR #4296 to allow users exclude some problematic files inside third party dependencies folder in rush deploy process

But after this PR #4313 merged, the problematic files will still be analyzed by symlinkAnalyzer, even though they are configured to be excluded. And cause errors like

Symlink targets not under folder xxx

Repro steps

  1. Clone repo https://github.com/EscapeB/rush-playground

    DON'T need to rush commands like rush update or rush install
    We have created a fake problematic dependency inside symlink-demo project and committed it in node_modules.

  2. Create symlink
     # Create a symlink outside Monorepo root, this symlink should inside dependencies' folder. 
     # For example, we created a fake dependency named `dependency-with-error`, and create a python3 symlink in its folder.
     cd projects/symlink-demo
     ln -s /usr/bin/python3 node_modules/dependency-with-error/build/python3
  3. Rush rush deploy command
    rush deploy -p symlink-demo -t output --overwrite

Expected result:
Project symlink-demo should be extracted successfully.

Actual result:
image

cc @D4N14L I created a new issue to track the problem in #4313