Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missed cppo directive #1208

Merged
merged 2 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/melc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,12 @@ let main: Melc_cli.t -> _ Cmdliner.Term.ret
(* The OCaml compiler expects include_dirs in reverse CLI order, but
cmdliner returns it in CLI order. *)
List.rev_append include_dirs !Clflags.include_dirs;
#if OCAML_VERSION >= (5,2,0)
Clflags.hidden_include_dirs :=
List.rev_append hidden_include_dirs !Clflags.hidden_include_dirs;
#else
let _hidden_include_dirs = hidden_include_dirs in
#endif

List.iter ~f:Warnings.parse_alert_option alerts;

Expand Down
8 changes: 7 additions & 1 deletion jscomp/core/record_attributes_check.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ let process_tag_name attrs =
};
] -> (
namespace_error ~loc txt;
match const.pconst_desc with
match
#if OCAML_VERSION >= (5, 3, 0)
const.pconst_desc
#else
const
#endif
with
| Pconst_string (s, _, _) -> st := Some s
| _ -> ())
| _ -> ());
Expand Down
3 changes: 1 addition & 2 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
, git
, python3
, nodePackages
, pkgs
, release-mode ? false
}:

Expand All @@ -21,7 +20,7 @@ in
mkShell {
inputsFrom = lib.attrValues derivations;
nativeBuildInputs = with ocamlPackages; [
pkgs.ocaml-ng.ocamlPackages_5_2.ocamlformat
ocamlformat
utop
ocaml-lsp
merlin
Expand Down