mstorsjo wrote:

This breaks a number of tests on Windows.

Previously, to have tests working on Windows, one would do `git config --global 
core.autocrlf false` or similar, before checking out llvm-project - a number of 
test input files _need_ to be in LF form to work. This was brought up earlier 
already by @llvm-beanz in 
https://github.com/llvm/llvm-project/pull/86318#issuecomment-2093160376.

Now after this change, due to the added `.gitattributes` which overrides the 
`core.autocrlf` setting, these files get checked out with CRLF newlines (as the 
native form for the platform).

Based on the comment in the .gitattributes file, it seems like this is both 
known and intentional behaviour:
```
# Checkout as native, commit as LF except in specific circumstances
* text=auto
```

While it was already stated that blanket checkouts with CRLF _will_ fail.

Additionally, the old mechanism of getting working newlines in the files is 
suddenly broken.

---

To make things worse, you won't notice this thing if you're updating an 
existing workdir - files that aren't touched aren't rewritten. (To trigger 
re-checkout of files to get `.gitattributes` applied, one can do something like 
`git rm -r subdir && git reset && git checkout subdir`.) So I guess most 
buildbots will keep chugging along fine, until someone pushes changes that 
touch those files. If running with a fresh checkout of llvm-project, this has a 
much bigger impact.

---

For compiler-rt tests, a handful of the profile tests depend on the right line 
endings - I can push a local `.gitattributes` file to fix that (see 
https://github.com/mstorsjo/llvm-project/commit/99bec81c87dcd2b7a7970954882bc0e42239d381).

But the Clang, clang-tools-extra and LLVM testsuites have _many_ tests that are 
broken - from an initial (unverified) test run, there are around 80 tests 
failing due to this - sorting that out is a much bigger task that I'm not 
volunteering to take on right now.

CC @AaronBallman as the majority of those failing tests are in Clang.

Can we revert this until we figure out these bits? Do we really want checkouts 
to default to having the majority of files with CRLF on Windows? I would expect 
that most people working on Windows don't really want this (this wasn't the 
case so far anyway)? And other than that, we do need to tag the files that rely 
on being in LF form so that things work on Windows with either setting.

https://github.com/llvm/llvm-project/pull/86318
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to