The JJ vs Git debate at Gradle: <https://blog.grad...
# community-news
l
d
I always wondered why Cradle wrapper was also shipped as a
.bat
. That seems useless and archaic to me as nowadays developers on Windows use WSL anyway.
s
Just a general comment: the LLM voice (Variations of "No A, no B, just C", excessive nominalizations, and the like) can be felt from the article, even though it doesn't read as fully LLM-written so I assume there has been some attempt to clean that up. I find the remaining LLMy bits more distracting and suspicious than if I were reading an article written by a non-native speaker, for example. It's a pity because I find the content itself to be useful and informative.
1
s
Is this an issue primarily i people on non-Windows tries to open/alter the CRLF-spaced file, or doesn't that matter? Basically asking if the file is CRLF-spaced in the repo, and is never opened on non-Windows, will
jj
care?
s
The entire idea of secretly storing a modified version of the file contents seems like something a VCS simply shouldn't do. This very similar to a formatting violation and should be caught before committing or pushing if possible. When
jj
gets support for hooks, that is where I would handle this. For now, one possible "fix" for a
jj
environment is to actually configure a "fix tool" that runs on
*.bat
files and repairs the line endings. The wrapper .bat file does way too much work anyway. It should have one line:
Copy code
java -jar ./gradle/wrapper/gradle-wrapper.jar %*
Then you don't have a
goto
problem.
o
jj
cares regardless of where the file comes from, because it doesn't apply the transformation git does to store LF "internally" (i.e., in the
.git
structure); so the CRLF form on disk always appears as changed from the LF form that is part of commits, on every platform (since the CRLF form is checked out everywhere). Re: "The entire idea of secretly storing a modified version of the file contents seems like something a VCS simply shouldn't do."; it's not exactly secret because we explicitly ask for it in
.gitattributes
. I do think that adding a hook of some kind could be good, but the issue is enforcement across all users who would commit. The
gradlew.bat
is maybe not the best example here because it's not expected that you manually edit it, but I have used
.gitattributes
in other cases to guard against CRLF being committed in all other files. This is something you can guard against using CI, but it's a lot easier if you can just set something in your repository and it automatically works for all users. It means every repo doesn't need to have CI or tell you how to setup hooks. For simple projects I think that is valuable.
r
@Sergej Koščejev What do you mean by "excessive nominalizations?"
@Didier Villevalois WSL isn't Windows, and projects that support Windows have a legitimate need to run their tests on native Windows. I've found issues before with Windows and even Windows for ARM
The wrapper could be shipped as a
.cmd
or even a
.ps1
but I'm not sure what portability/compatibility implications this would have
s
@Ryan Schmitt I re-read the article now and couldn't find any jarring examples, so I must have been wrong here (or the article was edited). In general what I meant is LLMs sometimes write in "declarative" style using lots of nouns and skipping on verbs.