Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

The format handler does not seem to be triggered on some systems #22

Open
decimad opened this issue Jan 11, 2018 · 5 comments
Open

The format handler does not seem to be triggered on some systems #22

decimad opened this issue Jan 11, 2018 · 5 comments

Comments

@decimad
Copy link

decimad commented Jan 11, 2018

Hey,
another problem I run into is that the format handler does not seems to be triggered on some systems (in contrast to mine with vscode32@win7 running with vscode64@win10).

On those systems, the debug output with 2.8.3 is:

Debug: extension started
Debug: registered formatter
Debug: uncrustify installed: true
Debug: should uncrustify be installed: false
Debug: installers found: none
Debug: installer choice: undefined

Yet manually triggering a document format does not trigger the plugin handler on these systems. It triggers them on my system though.
Are there any other spots I could check that could interfere with the handler being called?

@LaurentTreguier
Copy link
Owner

On which system(s) exactly does the format handler run/not run ? The Debug: installers found: none line leaves me puzzled. There should be an installer proposed on Windows, macOS and almost every linux distribution...

@decimad
Copy link
Author

decimad commented Jan 17, 2018

Hello, sorry for the delay and thanks for the reply.

The situation on all machines is that we want to use the extension on sources trees handled by the C/C++ Tools.

I have the uncrustify extension format handler working (ie. the handler gets triggered) on vscode64@win7x64. I need to add that on this machine I also have the editorconfig extension installed, maybe there is some interaction possible?

The machines failing the triggering are running vscode64@win10x64. The installers found issue you are mentioning may very well be caused by a firewall/priviledges issue. However I assume inside a running vscode instance such issues do not arise (eg. for trigger calls or the like).

@LaurentTreguier
Copy link
Owner

This is very strange, considering that it works on VSCode x64 on Windows 10 x64 for me... How is uncrustify installed on the machine ? If the extension doesn't offer any installers then you have to install uncrustify manually and either have the executable in your PATH environment variable, or set the uncrustify.executablePath setting. If uncrustify can't be found then the formatter will silently fail, this is why I suspect it's an uncrustify intallation issue.

@decimad
Copy link
Author

decimad commented Jan 18, 2018

Hello, thank you!
Would the formatter handler in this case with "uncrustify.debug" on still log it was triggered? Because we're missing this notification on these machines altogether. If not, then I need to doubly and triply verify the paths...

@LaurentTreguier
Copy link
Owner

It should log the location of the config file, and the command line that's executed, even if the path to uncrustify is wrong. The only scenario I can think of in which the code is formatted without getting the logs, is if another formatter was installed and was used by VSCode instead of uncrustify...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants