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

Workbench doesn't respect excluded_paths from .shiftrc #29

Closed
mortenscheel opened this issue Jul 28, 2021 · 6 comments
Closed

Workbench doesn't respect excluded_paths from .shiftrc #29

mortenscheel opened this issue Jul 28, 2021 · 6 comments
Labels
question Further information is requested

Comments

@mortenscheel
Copy link

Desktop:

  • OS: Ubuntu
  • OS Version: 20-04
  • App Version: 0.4.6.0

Describe the bug
Apparently Workbench doesn't read excluded_paths from .shiftrc when running tasks.

I've added excluded_paths = "app/Subfolder" to .shiftrc because the folder contains some problematic classes that trigger an infinite loop/recursion when PhpStan tries to analyze them. I can process the project with Rector, as long as this folder is ignored.

Is there some other way to get Workbench to ignore certain files or folders?

To Reproduce
Steps to reproduce the behavior:

  1. Add a folder path (containing files that would be modified by the task) to excluded_paths in .shiftrc
  2. Run the task
  3. Check if any files in the excluded folder are modified
@jasonmccreary
Copy link
Collaborator

@mortenscheel, does the path you are specifying contain the .shiftrc file? Which task are you running? If it is a PHP task, what is output for the tasks for "scanning folder"?

@jasonmccreary jasonmccreary added question Further information is requested and removed pending labels Jul 28, 2021
@mortenscheel
Copy link
Author

Hi @jasonmccreary

No, the .shiftrc file is in the project root, and I'm trying to exclude app/Subfolder.
I'm running php/switch-to-match
The task log shows >>> Event: Processing paths: database, app, config, routes, tests.

By the way I finally figured out why PHPStan went into infinite recursion when trying to analyse those classes: phpstan/phpstan#5390

@jasonmccreary
Copy link
Collaborator

@mortenscheel, I assume you specify the path to the project root in the Workbench?

@mortenscheel
Copy link
Author

Yes. I select the project folder using the Browse button, and it looks correct in the editor:

path: /home/morten/Code/lv-tmp
tasks:
- name: 'switch to match'
  uses: php/switch-to-match

Besides, it does manage to modify some of the files, until it reaches the folder that causes infinite recursion (which should have been excluded).

I've tried the same recipe in Linux, Windows and online, and all of them fail. Presumably because they run out of memory trying to analyse the problematic folder.

@jasonmccreary
Copy link
Collaborator

Sounds good. We'll get this patched up in the next few days.

@jasonmccreary
Copy link
Collaborator

This should be patched in the latest release (0.4.7). Let us know if you have any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants