Skip to content

Commit

Permalink
Deprecate smart_print package name in favor of smart-print
Browse files Browse the repository at this point in the history
Dune does not like the fact that the public name of
smart_print library is different from the corresponding
opam file (it contains a hyphen instead of an underscore)
  • Loading branch information
Anton Trunov committed Jun 5, 2020
1 parent ab032e4 commit 04b225a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ Else download the sources and run:
$ make
# make install

You can also `make doc` and `make test`. To compile your programs with SmartPrint:

$ ocamlbuild my_program.native -libs smart_print
You can also `make doc` and `make test`. To compile your programs with SmartPrint
add `smart-print` to the `libraries` stanza in your `dune` file(s).

Do not forget to open the SmartPrint module in your code:

Expand All @@ -40,7 +39,7 @@ Open an OCaml toplevel:

```ocaml
#use "topfind";;
#require "smart_print";;
#require "smart-print";;
open SmartPrint;;
```

Expand Down
6 changes: 5 additions & 1 deletion dune
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
(library
(name smart_print)
(wrapped false)
(public_name smart_print)
(public_name smart-print)
(modules smartPrint)
(synopsis "SmartPrint pretty-printing library"))

(deprecated_library_name
(old_public_name smart_print)
(new_public_name smart-print))

(test
(name test)
(libraries smart_print)
Expand Down
6 changes: 4 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
(lang dune 1.0)
(name smart-print)
(lang dune 2.0)
(package
(name smart-print)
(deprecated_package_names smart_print))
2 changes: 1 addition & 1 deletion smart-print.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license: "BSD-3-Clause"

depends: [
"ocaml" {>= "4.00.0"}
"dune" {>= 1.0}
"dune" {>= "2.0"}
"odoc" {with-doc}
]
build: make
Expand Down

0 comments on commit 04b225a

Please sign in to comment.