-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Cannot install rustfmt plugin - No such file or directory error #409
Comments
Thanks for reporting this! It's strange. What's actually happening here is:
I've update the verbose logging for the next release so this is more clear (not sure when I'll do a release). f00c231 I have no idea what's causing that "No such file or directory" error and I think it might one of the following parts of the code: f00c231#diff-79062ef7f1835a7b3c02a47cfdf3259116b6fed336bbe883bcd1480da1770ffbL42 7d5a121#diff-c661f51854e6a2fac0ad230f75930d1d694d3002d2f2d068e1f30bb670987e5dR47 These were the only places I could see that previously didn't attach the file name to the error message. I wonder if some other process is deleting the written executable immediately after it's written to your |
@rishflab actually, I just released 0.17.0 and it has these changes. Could you try in 0.17.0 and let me know what the output is of |
Hmm, not that I can think of |
Great, that narrowed it down, but this is very strange and makes no sense to me.
So the executable passes the check to make sure it exists...
But then it fails being spawned saying "No such file or directory" here...
By the way, installing the rustfmt plugin works fine for me on linux (I'm assuming you're on linux based on the rustfmt executable download path... I have yet to try on Mac). |
So I removed the deletion of the plugins step and tried to execute the plugin ( I ran
This output seems to be ok based on what I read here https://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file-exists but I am no expert on these things. I think what we can confirm is that the problem is the plugin being downloaded simply does not work on my system. I will try compiling the plugin from source to see if that helps.
Yep I am on linux (NixOS 21.05) |
I am unable to build the plugin from source targetting wasm32. I will open an issue in that repo |
I'm also not super familiar with this stuff (you know more than me). I also thought it might be the case that the executable downloaded does not work on your system, but the dprint CLI and the rustfmt plugin should be built the same way. Maybe there is something special that rustfmt does and that causes issues. Thanks so much for looking into this! I will follow up on dprint/dprint-plugin-rustfmt#6 soon |
I was able to get the rustfmt plugin compiling with this command. I changed the plugin file to point to the locally compiled and zipped plugin and it worked. |
The rustfmt plugin has moved to dprint-plugin-exec, so closing https://github.com/dprint/dprint-plugin-exec?tab=readme-ov-file#example---rustfmt |
Version: 0.16.3
The rust fmt plugin does not seem to install. It seems to write a file to a folder and then delete the folder. Is this potentially causing the problem?
dprint.json
The text was updated successfully, but these errors were encountered: