soderlind / vscode-phpcbf

PHP Code Beautifier and Fixer for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=persoderlind.vscode-phpcbf
GNU General Public License v3.0
28 stars 10 forks source link

executablePath broken #36

Open josias-r opened 4 years ago

josias-r commented 4 years ago

I'm experiencing a strange issue.

I've got a multi-root workspace with three folders related to the project. One of the folders has a vscode folder specific settings.json. Inside it, I've set the phpcbf executablePath as a relative path. This works after changing the settings and formatting the document works fine. But when I restart vscode it can't find the exePath anymore.

I've got debug enabled and while it's working, I get the resolved absolute path logged to console: [Extension Host] PHPCBF args: /Users/josias_r/git/myproject/api/vendor/bin/phpcbf. But when it's not working anymore (after restart) the relative path is not resolved anymore: [Extension Host] PHPCBF args: myproject/api/vendor/bin/phpcbf.

I've set the exePath to ./api/vendor/bin/phpcbf

josias-r commented 4 years ago

It's even more random than that. Sometimes when it's working, it suddenly stops working, after actions like opening and closing files. When I then modify the VSCode settings for the executablePath it sometimes works again.

I think the problem is not just my multi-root project. But also, that one of the root folders is a subfolder of another root folder (a git submodule).

josias-r commented 4 years ago

@soderlind any ideas?