It would be nice to have an --in-place equivalent so formatting can be forced as a pre-commit hook (like lot’s of team do this day with js/prettier). I miss that from reasonml.
We noticed that bsc -format doesn’t exactly match the result of “format on save” in vscode. I haven’t looked in detail at the differences or what is happening yet.
We can consider it soon now that the CLI redesign is coming out =D. I personally can’t stand any slowdown during commit, so no pre-commit hooks for me ever. Don’t wanna encourage folks to do so and lose sight of our perf goals, but I get the convenience.
Some people may not commit often and may be interested to lose a few ms when “committing” (the word is strong enough to be ready to way 0.5s after running a command) to ensure formatting of the code across the codebase & team mates.
It’s not about how many ms lost; it’s about the orientation of whether to make things faster or slower. For example, you’re enjoying a compilation performance that’s the result of us worrying about perf every change. 500ms once every half year, over five years, is 5 seconds, which is incidentally around how slow some of our competitors are.
Anyway this isn’t the right thread for me to yak shave about software philosophy. Like I mentioned, we’re considering it for the new CLI.