Skip to content

Commit

Permalink
Merge pull request ocaml#25 from art-w/remove_weird_warnings
Browse files Browse the repository at this point in the history
remove weird warnings
  • Loading branch information
art-w authored Feb 7, 2024
2 parents 648c756 + d222c61 commit 77ecc82
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $ opam install ancient
$ export SHERLODOC_DB=/tmp/sherlodoc.ancient

# index all odoc files generated by odig for your current switch:
$ sherlodoc index $(find $OPAM_SWITCH_PREFIX/var/cache/odig/odoc -name '*.odocl')
$ sherlodoc index $(find $OPAM_SWITCH_PREFIX/var/cache/odig/odoc -name '*.odocl' | grep -v __)
```

Enjoy searching from the command-line or run the webserver:
Expand Down Expand Up @@ -70,7 +70,7 @@ Otherwise, manual integration with odoc requires to add to every call of `odoc h

```bash
$ sherlodoc index --db=_build/default/_doc/_html/YOUR_LIB/db.js \
$(find _build/default/_doc/_odocls/YOUR_LIB -name '*.odocl')
$(find _build/default/_doc/_odocls/YOUR_LIB -name '*.odocl' | grep -v __)

$ sherlodoc js > _build/default/_doc/_html/sherlodoc.js
```
Expand Down
4 changes: 2 additions & 2 deletions test/cram/base_benchmark.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This test will fail, it is not deterministic. Please just check that the values
are not crazy and discard the changes
$ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | sort)
$ sherlodoc index --format=js --db=db.js $ODOCLS > /dev/null
$ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | grep -v "__")
$ sherlodoc index --format=js --db=db.js $ODOCLS
4 changes: 2 additions & 2 deletions test/cram/base_cli.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl')
$ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | grep -v "__")
$ export SHERLODOC_DB=db.bin
$ export SHERLODOC_FORMAT=marshal
$ sherlodoc index --index-docstring=false $ODOCLS > /dev/null
$ sherlodoc index --index-docstring=false $ODOCLS
$ sherlodoc search --print-cost --limit 100 "S_poly"
200 sig Base.Map.S_poly
200 sig Base.Set.S_poly
Expand Down
8 changes: 8 additions & 0 deletions test/cram/base_odocls.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
$ find ../docs/odoc/base/ -name '*.odocl' -exec basename '{}' ';' | grep -v "__" | sort
base.odocl
base_internalhash_types.odocl
caml.odocl
md5_lib.odocl
page-index.odocl
shadow_stdlib.odocl

$ find ../docs/odoc/base/ -name '*.odocl' -exec basename '{}' ';' | sort
base.odocl
base__.odocl
Expand Down
4 changes: 2 additions & 2 deletions test/cram/base_web.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | sort)
$ ODOCLS=$(find ../docs/odoc/base/ -name '*.odocl' | grep -v "__" | sort)
$ cat $ODOCLS > megaodocl
$ du -sh megaodocl
13M megaodocl
$ sherlodoc index --index-docstring=true --index-name=true --type-search=true --format=js --db=db.js $ODOCLS > /dev/null
$ sherlodoc index --index-docstring=true --index-name=true --type-search=true --format=js --db=db.js $ODOCLS

$ gzip -k db.js

Expand Down
6 changes: 3 additions & 3 deletions test/cram/multi_package.t
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$ ODOCLS=$(find ../docs/odoc/ -name '*.odocl' | sort)
$ ODOCLS=$(find ../docs/odoc/ -name '*.odocl' | grep -v "__" | sort)
$ echo "$ODOCLS" | awk 'END { print NR }'
142
6
$ export SHERLODOC_DB=db.bin
$ export SHERLODOC_FORMAT=marshal
$ sherlodoc index --index-docstring=false $ODOCLS > /dev/null
$ sherlodoc index --index-docstring=false $ODOCLS
$ sherlodoc search --print-cost --limit 100 "S_poly"
200 sig Base.Map.S_poly
200 sig Base.Set.S_poly
Expand Down

0 comments on commit 77ecc82

Please sign in to comment.