Skip to content

Commit

Permalink
Digest paths directly
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
  • Loading branch information
rgrinberg committed Jul 9, 2019
1 parent 81764ae commit 0c6b013
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/dune_project.ml
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ module File_key = struct
let to_string s = s

let make ~name ~root =
let root = Path.Local.to_string (Path.Source.to_local root) in
let name = Name.to_dyn name in
let digest = Digest.generic (name, root) |> Digest.to_string in
String.take digest 12
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Test the argument syntax
$ dune build --root driver-tests test_ppx_args.cma
Entering directory 'driver-tests'
ppx test_ppx_args.pp.ml
.ppx/ebf922f94b17b285b60ce166bb8ee16c/ppx.exe
.ppx/031272d0b003c307d6a59ce4a911dd3b/ppx.exe
-arg1
-arg2
-arg3=Oreo
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/merlin-tests/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
S $LIB_PREFIX/lib/ocaml
S .
S subdir
FLG -ppx '$PPX/cc09de268a52cd0978fa4dc12468a025/ppx.exe --as-ppx --cookie '\''library-name="foo"'\'''
FLG -ppx '$PPX/7e13e649a7f0a21347eded34e394c6e8/ppx.exe --as-ppx --cookie '\''library-name="foo"'\'''
FLG -open Foo -w -40 -open Bar -w -40
Make sure a ppx directive is generated
Expand Down
12 changes: 6 additions & 6 deletions test/blackbox-tests/test-cases/multiple-private-libs/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ This test checks that there is no clash when two private libraries have the same

$ dune build --display short @doc-private
odoc _doc/_html/highlight.pack.js,_doc/_html/odoc.css
ocamldep a/.test.objs/test.ml.d
ocamlc a/.test.objs/byte/test.{cmi,cmo,cmt}
odoc _doc/_odoc/lib/test@18aff0119d7d/test.odoc
odoc _doc/_html/test@18aff0119d7d/Test/.dune-keep,_doc/_html/test@18aff0119d7d/Test/index.html
ocamldep b/.test.objs/test.ml.d
ocamlc b/.test.objs/byte/test.{cmi,cmo,cmt}
odoc _doc/_odoc/lib/test@82709a3b2cd2/test.odoc
odoc _doc/_html/test@82709a3b2cd2/Test/.dune-keep,_doc/_html/test@82709a3b2cd2/Test/index.html
odoc _doc/_odoc/lib/test@4f4e394aec41/test.odoc
odoc _doc/_html/test@4f4e394aec41/Test/.dune-keep,_doc/_html/test@4f4e394aec41/Test/index.html
ocamldep a/.test.objs/test.ml.d
ocamlc a/.test.objs/byte/test.{cmi,cmo,cmt}
odoc _doc/_odoc/lib/test@574d7a9dbf61/test.odoc
odoc _doc/_html/test@574d7a9dbf61/Test/.dune-keep,_doc/_html/test@574d7a9dbf61/Test/index.html
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/private-public-overlap/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ On the other hand, public libraries may have private preprocessors
ocamlc .ppx_internal.objs/byte/ppx_internal.{cmi,cmo,cmt}
ocamlopt .ppx_internal.objs/native/ppx_internal.{cmx,o}
ocamlopt ppx_internal.{a,cmxa}
ocamlopt .ppx/6569fd48fa20dbda6f19ee31503e0e6b/ppx.exe
ocamlopt .ppx/56104176c8a6db31b669b5ba60470694/ppx.exe
ppx mylib.pp.ml
ocamldep .mylib.objs/mylib.pp.ml.d
ocamlc .mylib.objs/byte/mylib.{cmi,cmo,cmt}
Expand All @@ -38,7 +38,7 @@ Unless they introduce private runtime dependencies:
ocamlc .private_ppx.objs/byte/private_ppx.{cmi,cmo,cmt}
ocamlopt .private_ppx.objs/native/private_ppx.{cmx,o}
ocamlopt private_ppx.{a,cmxa}
ocamlopt .ppx/e073d39e263d2207fc6251216c0459b4/ppx.exe
ocamlopt .ppx/6100aaab21a64480982f84e67ccfce18/ppx.exe
ppx mylib.pp.ml
ocamldep .mylib.objs/mylib.pp.ml.d
[1]
Expand Down

0 comments on commit 0c6b013

Please sign in to comment.