Skip to content

Commit eaea1a1

Browse files
authored
No longer temper with crlf on windows (#2087)
1 parent cda0185 commit eaea1a1

File tree

4 files changed

+10
-22
lines changed

4 files changed

+10
-22
lines changed

.github/workflows/js_of_ocaml.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,6 @@ jobs:
108108
if: ${{ matrix.os == 'ubuntu-latest' }}
109109
run: sudo apt-get update
110110

111-
- name: Set git to use LF
112-
if: ${{ matrix.os == 'windows-latest' && matrix.ocaml-compiler < 5.2 }}
113-
run: |
114-
git config --global core.autocrlf false
115-
git config --global core.eol lf
116-
git config --global core.ignorecase false
117-
118111
- name: Checkout tree
119112
uses: actions/checkout@v5
120113

.github/workflows/wasm_of_ocaml.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,6 @@ jobs:
6969
if: ${{ matrix.os == 'ubuntu-latest' }}
7070
run: sudo apt-get update
7171

72-
- name: Set git to use LF
73-
if: ${{ matrix.os == 'windows-latest' && matrix.ocaml-compiler < 5.2 }}
74-
run: |
75-
git config --global core.autocrlf false
76-
git config --global core.eol lf
77-
git config --global core.ignorecase false
78-
7972
- name: Checkout tree
8073
uses: actions/checkout@v5
8174
with:
@@ -104,7 +97,7 @@ jobs:
10497
with:
10598
token: ${{ github.token }}
10699

107-
- name: Pin faked binaryen-bin package
100+
- name: Install faked binaryen-bin package
108101
# It's faster to use a cached version
109102
run: opam install --fake binaryen-bin
110103

compiler/tests-check-prim/gen_dune.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ let rule bc ocaml_version os_type =
8686

8787
let () =
8888
let versions : version list = [ `V4_14; `V5_2; `V5_3; `V5_4 ] in
89+
set_binary_mode_out stdout true;
8990
List.iter
9091
(fun ocaml_version ->
9192
List.iter

compiler/tests-compiler/js_parser_printer.ml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ let check_vs_string s toks =
727727
then ()
728728
else
729729
match s.[a] with
730-
| ' ' | '\n' | '\t' -> space (succ a) b
730+
| ' ' | '\n' | '\t' | '\r' -> space (succ a) b
731731
| c -> Printf.printf "pos:%d, expecting space until %d, found %C\n" a b c
732732
in
733733
let text pos str =
@@ -873,37 +873,38 @@ let%expect_test "string" =
873873
5: 4:var, 8:a, 10:=, 12:"munpi\207\128\207\128\207\128qtex", 26:;, |}]
874874

875875
let%expect_test "multiline string" =
876-
parse_print_token ~invalid:true {|
876+
let clean s = Str.global_replace (Str.regexp "\r\n") "\n" s in
877+
parse_print_token ~invalid:true (clean {|
877878
42;
878879
"
879880
";
880881
42
881-
|};
882+
|});
882883
[%expect
883884
{|
884885
2: 4:42, 6:;,
885886
3: 4:"\n ",
886887
4: 5:;,
887888
5: 4:42, 0:;,
888889
Lexer error: fake:3:5: Unexpected token ILLEGAL |}];
889-
parse_print_token {|
890+
parse_print_token (clean {|
890891
42;
891892
"\
892893
";
893894
42
894-
|};
895+
|});
895896
[%expect {|
896897
2: 4:42, 6:;,
897898
3: 4:" ",
898899
4: 5:;,
899900
5: 4:42, 0:;, |}];
900-
parse_print_token ~invalid:true {|
901+
parse_print_token ~invalid:true (clean {|
901902
42;
902903
"
903904
904905
";
905906
42
906-
|};
907+
|});
907908
[%expect
908909
{|
909910
2: 4:42, 6:;,

0 commit comments

Comments
 (0)