[flagged]
Why is that terrifying?
Formatting a 25M-line codebase overnight
21–30 of 115 posts
Re: Formatting a 25M-line codebase overnight
#22I’m shocked at the 25M line part! That is a completely unfathomable amount of code for one codebase. I really want to know more about that.
https://research.google/pubs/why-google-stores-billions-of-l...
Re: Formatting a 25M-line codebase overnight
#23Why bother formatting 25m lines of slop, and why is AI wasting tokens on making code look human-readable anyway?
Re: Formatting a 25M-line codebase overnight
#24Now it makes me wonder, are those 45M LoC are untyped ?
Re: Formatting a 25M-line codebase overnight
#25Re: Formatting a 25M-line codebase overnight
#26I had to introduce a formatter in a few sizeable codebases in the past (few 100k to few million LOC), and I always did it incrementally via a script that reformatted all files that are not touched in any open PR. The initial run reformatted 95% of all files. Then I ran the script every day for ~two weeks and got up to 99.5% of all files and then manually each time one of the remaining ~dozen PRs that were WIP for longer were merged.
Re: Formatting a 25M-line codebase overnight
#27Re: Formatting a 25M-line codebase overnight
#28I'm surprised they went with a all-at-once reformat. Even when doing it over a weekend this is bound to mess with a lot of open PRs at their scale. I had to introduce a formatter in a few sizeable codebases in the past (few 100k to few million LOC), and I always did it incrementally via a script that reformatted all files that are not touched in any open PR. The initial run reformatted 95% of all files. Then I ran th…
Re: Formatting a 25M-line codebase overnight
#29The dart formatter has an internal sanity check. It walks through the unformatted and formatted strings in parallel skipping any whitespace. If any non-whitespace characters don't match, it immediately aborts. This ensures that the only thing the formatter changes is whitespace, and makes it much less spooky to run it blind on a huge codebase.
That sanity check has saved my ass a couple of times when weird bugs crept in, usually around unusual combinations of language features around new syntax.
(Unfortunately, the formatter in the past year has gotten a little more flexible about the kinds of changes it makes, including sometimes moving comments relatively to commas and brackets, so this sanity check skips some punctuation characters too, making it a little less reliable.)
Re: Formatting a 25M-line codebase overnight
#30Earlier quoted context omitted.
Why is that terrifying?
ive yet to see a compelling elitist programming language opinion. especially when used at big successful companies. these companies don't function in spite of their technology choices.
shows you never worked at "big succesful companies".