Declarative CSV codecs
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Migrate from vendored crowbar to opam-pinned alcobar

- Remove vendored crowbar/ directory
- Replace all Crowbar references with Alcobar across 176 .ml files
- Update all fuzz dune files: crowbar → alcobar in libraries
- Remove 77 gen_corpus.ml files (alcobar handles corpus internally)
- Update dune-project files: crowbar → alcobar in dependencies
- Update merlint rules (e705, e726): Crowbar → Alcobar in checks,
docs, and examples
- Update merlint generated docs (index.html)

428 files changed, ~1200 lines removed net.

+6 -49
+2 -8
fuzz/dune
··· 9 9 (executable 10 10 (name fuzz) 11 11 (modules fuzz fuzz_csvt) 12 - (libraries csvt crowbar)) 13 - 14 - (executable 15 - (name gen_corpus) 16 - (modules gen_corpus) 17 - (libraries unix fmt)) 12 + (libraries csvt alcobar)) 18 13 19 14 (rule 20 15 (alias runtest) ··· 32 27 (= %{profile} afl)) 33 28 (deps 34 29 (source_tree corpus) 35 - fuzz.exe 36 - gen_corpus.exe) 30 + fuzz.exe) 37 31 (action 38 32 (echo "AFL fuzzer built: %{exe:fuzz.exe}\n")))
+1 -1
fuzz/fuzz.ml
··· 1 - let () = Crowbar.run "csvt" [ Fuzz_csvt.suite ] 1 + let () = Alcobar.run "csvt" [ Fuzz_csvt.suite ]
+2 -2
fuzz/fuzz_csvt.ml
··· 1 - (* Crowbar-based fuzz testing for Csvt *) 1 + (* Alcobar-based fuzz testing for Csvt *) 2 2 3 - open Crowbar 3 + open Alcobar 4 4 5 5 (* {1 Generators} *) 6 6
+1 -1
fuzz/fuzz_csvt.mli
··· 1 - val suite : string * Crowbar.test_case list 1 + val suite : string * Alcobar.test_case list
-37
fuzz/gen_corpus.ml
··· 1 - (* Generate seed corpus for AFL fuzzing *) 2 - 3 - let () = 4 - let dir = "corpus" in 5 - (try Unix.mkdir dir 0o755 with Unix.Unix_error (Unix.EEXIST, _, _) -> ()); 6 - let write name content = 7 - let path = Filename.concat dir name in 8 - let oc = open_out path in 9 - output_string oc content; 10 - close_out oc 11 - in 12 - (* Simple valid CSVs *) 13 - write "simple_int" "v\n42\n"; 14 - write "simple_float" "v\n3.14\n"; 15 - write "simple_string" "v\nhello\n"; 16 - write "simple_bool" "v\ntrue\n"; 17 - write "two_cols" "a,b\n1,hello\n"; 18 - write "three_cols" "a,b,c\n1,2.5,test\n"; 19 - write "multi_row" "v\n1\n2\n3\n4\n5\n"; 20 - write "reordered" "b,a\nhello,42\n"; 21 - write "nullable" "v\nNULL\n1.5\nNULL\n"; 22 - write "empty_field" "a,b\nhello,\n"; 23 - write "extra_cols" "a,extra,b\n1,ignored,hello\n"; 24 - write "whitespace_header" " a , b \n1,hello\n"; 25 - (* Edge cases *) 26 - write "header_only" "a,b,c\n"; 27 - write "empty" ""; 28 - write "just_newlines" "\n\n\n"; 29 - write "bad_int" "v\nabc\n"; 30 - write "bad_float" "v\nxyz\n"; 31 - write "negative" "v\n-999\n"; 32 - write "scientific" "v\n1.5e-3\n"; 33 - write "zero" "v\n0\n"; 34 - write "large_int" "v\n2147483647\n"; 35 - write "bool_variants" "v\ntrue\nfalse\n1\n0\nyes\nno\n"; 36 - write "many_commas" "a,b,c,d,e,f\n1,2,3,4,5,6\n"; 37 - Format.printf "Generated %d corpus files in %s/@." 22 dir