Comments (3)
yeah I noticed the same thing with some other formatters - dprint-plugin-exec
essentially runs "for each file, read file from disk, pass to exec formatter, read format result from output"
This ofc means that you pay the spin up / spin down cost for the executable - which is BRUTAL.
If we could do something like "pipe/pass list of files and expect a JSON response" then it would be much more efficient in every way.
from dprint-plugin-exec.
I'd recommend ensuring that incremental formatting is not disabled (don't have "incremental": false
in the config file). It will be slower on the first run than dprint-plugin-rustfmt
was, but after that it will only format files that have changed, which should be almost as fast as before. On the CI, there is a way to cache the incremental cache to also make it fast. Unfortunately there is a bug related to caching on GH actions (dprint/dprint#735) so after I fix that I will update and add some instructions here: https://dprint.dev/ci/
Unfortunately I have too many projects and so I had to cut back somehow. dprint-plugin-rustfmt was dropped because dealing with its upgrades became difficult and a drawback with using it was that running cargo fmt
could differ whereas now with dprint-plugin-exec
the two can be more easily aligned.
If we could do something like "pipe/pass list of files and expect a JSON response" then it would be much more efficient in every way.
The issue is that it needs to also work in an editor scenario where the file might not exist on the file system. Additionally, adding this introduces complexity both for dprint's plugin system and for users configuring the exec plugin because they'd have to provide a way to get executables to work with file paths and when formatting via stdin.
This ofc means that you pay the spin up / spin down cost for the executable - which is BRUTAL.
Yeah, this is why dprint-plugin-prettier and dprint-plugin-roslyn still exist. Languages like JS and C# (when not using AOT compilation) are too slow to startup, but rustfmt is fast enough.
from dprint-plugin-exec.
I think archiving the repository and blocking any contribution is not the solution to the maintainace burden. Even if someone is interested in helping you, they cannot make a pull request.
https://github.com/dprint/dprint-plugin-rustfmt
Now, dprint is moving against the very reason I was using it: Fast formatting and built-in integration. I also do not understand this requirement that everything should run inside WASM. Why is that a requirement, and why is it worth damaging the ecosystem because of WASM?
from dprint-plugin-exec.
Related Issues (13)
- error creating plugin dprint-plugin-exec HOT 5
- Split args taking into account quotes HOT 1
- Setting up prettier-package-json HOT 7
- Use an object for sub config
- Prefer resolving to PATHEXT extensions on Windows
- `stdout` option for the tools that directly write to the file HOT 1
- Support multiple binaries
- Can't get it to work with `xo` HOT 3
- Add release integration test
- dprint lsp not formating using exec commands
- Replace handlebars with string replace HOT 1
- Kill child process on timeout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dprint-plugin-exec.