You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm running your stack on GitHub Action Windows CI, with the current default git settings (checked out files as CRLF). However, it seems that ocaml-env exec -- trivialScript changes some things. The files are still in CRLF but in my setup, git diff is showing a diff, possibly a stale git diff cache (I hardly believe this is actually the case but I've checked all the file's line ending at every step of my commands).
Tldr:
CI windows git checkout with CRLF
file.txt still in CRLF
git diff empty
run trivialScript
file.txt still in CRLF of course
git diff still empty
run ocaml-env exec --trivialScript
file.txt still in CRLF
git diff now shows that there are diffs, but the diff view shows that there isn't any (including, no newline changes. Unless I'm using git diff's options wrong):
-foo
+foo
I'm unfamiliar with where I can find the source to ocaml-env; do you know what could have happened here?
The text was updated successfully, but these errors were encountered:
GitHub Action checks out code on windows on CRLF. This PR tried many methods of just using CRLF or converting to LF.
Tips:
- `print_endline` and multiline strings on windows ocaml fork use CRLF. `open_in_bin` + `really_input_string` too (!)
- `dos2unix` hangs when used inside `test.sh` but doesn't hang inside `ci.yml`.
- `cat` and `pipe` don't change line ending.
- use `cat -A` to check for line endings visibly. Life saving debugger.
- `sed "s/\r\n/\n/g"` apparently doesn't work on CI windows...
- `git checkout` + `ocaml-env` bug (?) fdopen/opam-repository-mingw#92
Whichever method of directly using CRLF doesn't work because of the last issue; it's likely that I'm being dumb...
So right now we set git to checkout using LF, let our native code output to CRLF, then instead of `dos2unix` or `sed`, use a perl one-liner in `test.sh` to convert those back into LF for comparison.
Hello! I'm running your stack on GitHub Action Windows CI, with the current default git settings (checked out files as CRLF). However, it seems that
ocaml-env exec -- trivialScript
changes some things. The files are still in CRLF but in my setup,git diff
is showing a diff, possibly a stale git diff cache (I hardly believe this is actually the case but I've checked all the file's line ending at every step of my commands).Tldr:
file.txt
still in CRLFgit diff
emptytrivialScript
file.txt
still in CRLF of coursegit diff
still emptyocaml-env exec --trivialScript
file.txt
still in CRLFgit diff
now shows that there are diffs, but the diff view shows that there isn't any (including, no newline changes. Unless I'm usinggit diff
's options wrong):I'm unfamiliar with where I can find the source to ocaml-env; do you know what could have happened here?
The text was updated successfully, but these errors were encountered: