Hello,
I must admit I haven’t looked deeply into the issue but I didn’t find an obvious solution, so hopefully, a solution will be posted here.
Problem: Our growing OCaml project has many opam files at the project root, and most of them are empty. This clutters the view in GitHub and elsewhere.
~/semgrep $ wc -l *.opam
47 ast_generic.opam
35 commons.opam
0 graph_code.opam
27 lib_parsing.opam
0 lib_parsing_tree_sitter.opam
0 ograph.opam
0 ojsonnet.opam
0 osemgrep_targeting.opam
0 otarzan.opam
0 parser_bash.opam
0 parser_c.opam
0 parser_cpp.opam
0 parser_csharp.opam
0 parser_dockerfile.opam
0 parser_elixir.opam
0 parser_go.opam
0 parser_java.opam
0 parser_javascript.opam
0 parser_jsonnet.opam
0 parser_json.opam
0 parser_julia.opam
0 parser_kotlin.opam
0 parser_lisp.opam
0 parser_lua.opam
0 parser_ocaml.opam
0 parser_php.opam
0 parser_python.opam
0 parser_regexp.opam
0 parser_r.opam
0 parser_ruby.opam
0 parser_rust.opam
0 parser_scala.opam
0 parser_solidity.opam
0 parser_swift.opam
0 parser_terraform.opam
0 parser_typescript.opam
0 pfff-lang_GENERIC-analyze.opam
0 pfff-lang_GENERIC-naming.opam
24 process_limits.opam
25 profiling.opam
65 semgrep.opam
29 spacegrep.opam
0 tree-sitter-lang.opam
0 tree-sitter-to-generic.opam
252 total
The opam files were created because dune requires such a file for any local library that’s declared as public. Having an empty file is sufficient for the project to build. Maybe we shouldn’t leave them empty, but this doesn’t solve the problem. We’d like to hide them from view in one way or another. Being able to keep them in an opam/
folder or similar would be great. Is there such a solution already? Is it more of an opam issue or a dune issue?
6 posts - 5 participants