Skip to content

Commit

Permalink
Deprecate the Stream and Genlex stdlib modules (#10482)
Browse files Browse the repository at this point in the history
The core OCaml development team decided to remove the Stream and Genlex modules from the standard library, making them available in a separate library camlp-streams instead.

To ease the transition, this commit adds a "deprecated" alert to the Stream and Genlex stdlib modules.  Actual removal will take place one or two major releases later.
  • Loading branch information
xavierleroy committed Jul 10, 2021
1 parent 3e69d9d commit ddd9ec2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Changes
Expand Up @@ -15,6 +15,11 @@ Working version
is actually a suffix of `name` and raises Invalid_argument otherwise.
(Xavier Leroy, report by whitequark, review by David Allsopp)

* #10482: mark the Stream and Genlex modules as deprecated, in preparation
for a future removal. These modules (without deprecation alert)
are now provided by the camlp-streams library.
(Xavier Leroy, review by Nicolás Ojeda Bär)

### Other libraries:

- #10192: Add support for Unix domain sockets on Windows and use them
Expand Down
2 changes: 2 additions & 0 deletions stdlib/Compflags
Expand Up @@ -37,5 +37,7 @@ case $1 in
stdlib__Float.cm[ox]) echo ' -nolabels -no-alias-deps';;
stdlib__Oo.cmi) echo ' -no-principal';;
# preserve structure sharing in Oo.copy (PR#9767)
stdlib__Genlex.cm[iox]) echo ' -w -3';;
# ignore the "deprecated" alert on the Stream module
*) echo ' ';;
esac
2 changes: 2 additions & 0 deletions stdlib/stdlib.mli
Expand Up @@ -1397,6 +1397,7 @@ module Format = Format
module Fun = Fun
module Gc = Gc
module Genlex = Genlex
[@@deprecated "Use the camlp-streams library instead."]
module Hashtbl = Hashtbl
module Int = Int
module Int32 = Int32
Expand Down Expand Up @@ -1429,6 +1430,7 @@ module Set = Set
module Stack = Stack
module StdLabels = StdLabels
module Stream = Stream
[@@deprecated "Use the camlp-streams library instead."]
module String = String
module StringLabels = StringLabels
module Sys = Sys
Expand Down
1 change: 1 addition & 0 deletions testsuite/tests/lib-stream/count_concat_bug.ml
@@ -1,4 +1,5 @@
(* TEST
flags = "-w -3"
include testing
*)

Expand Down
1 change: 1 addition & 0 deletions testsuite/tests/lib-stream/mpr7769.ml
@@ -1,4 +1,5 @@
(* TEST
flags = "-w -3"
readonly_files = "mpr7769.txt"
*)

Expand Down

0 comments on commit ddd9ec2

Please sign in to comment.