Fix build time regression

Summary:
Substituting modules into Core.Std breaks the linking behavior of
module aliases, and so does including the module type of Core.Std in a
signature.  So, for now, this diff exposes the broken functions in
Core's Gc, Signal, and Sys modules.

Reviewed By: cristianoc

Differential Revision: D4313140

fbshipit-source-id: d8fea00
master
Josh Berdine 8 years ago committed by Facebook Github Bot
parent aa231e5129
commit 6051a3e34c

@ -7,27 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module Sys = struct include Core.Std
include Core.Std.Sys
(* Core_sys does not catch Unix_error ENAMETOOLONG, see
https://github.com/janestreet/core/issues/76 *)
let file_exists ?follow_symlinks path =
try file_exists ?follow_symlinks path
with Unix.Unix_error _ -> `Unknown
let is_directory ?follow_symlinks path =
try is_directory ?follow_symlinks path
with Unix.Unix_error _ -> `Unknown
let is_file ?follow_symlinks path =
try is_file ?follow_symlinks path
with Unix.Unix_error _ -> `Unknown
end
include
(Core.Std : module type of Core.Std
with module Sys := Sys)
let ( @ ) = Caml.List.append let ( @ ) = Caml.List.append

@ -1,58 +0,0 @@
(*
* Copyright (c) 2016 - present Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Core.Std
(* Core's Gc and Signal modules wrap handler functions in catch-all exception handlers that
exit. This defeats the timeout mechanisms. So deprecate the offending functions to cause a
compilation failure if they are used. *)
module Gc : sig
module Expert : sig
module Alarm : sig
include module type of Gc.Expert.Alarm
val create : (unit -> unit) -> t
[@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Gc.create_alarm]"]
end
include module type of Gc.Expert with module Alarm := Alarm
val add_finalizer : 'a Heap_block.t -> ('a Heap_block.t -> unit) -> unit
[@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Gc.finalise]"]
val add_finalizer_exn : 'a -> ('a -> unit) -> unit
[@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Gc.finalise]"]
end
include (module type of Gc with module Expert := Expert)
end
module Signal : sig
module Expert : sig
include module type of Signal.Expert
val signal : Signal.t -> behavior -> behavior
[@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Sys.signal]"]
val set : Signal.t -> behavior -> unit
[@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Sys.set_signal]"]
val handle : Signal.t -> (Signal.t -> unit) -> unit
[@@deprecated "Adds a catch-all exception handler that exits, use [Caml.Sys.set_signal]"]
end
include (module type of Signal with module Expert := Expert)
end
include
(module type of Core.Std
with module Gc := Gc
and module Signal := Signal)
module IntSet : Caml.Set.S with type elt = Int.t
(* Compare police: generic compare mostly disabled. *)
val compare : No_polymorphic_compare.compare
val equal : No_polymorphic_compare.compare
val failwithf : ('a, Format.formatter, unit, 'b) format4 -> 'a
val invalid_argf : ('a, Format.formatter, unit, 'b) format4 -> 'a
Loading…
Cancel
Save