From 6e6c3a7c2714aeaee93b421b3ffc040874bd3b3a Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Sat, 15 Oct 2022 12:16:37 -0700 Subject: [PATCH] Prepare for 3.8.2 (#2673) --- HISTORY.md | 4 ++++ dune | 2 +- flake.lock | 42 +++++++++++++++++++++++++++++------------- flake.nix | 17 ++++++++++++++--- nix/default.nix | 9 ++++----- nix/shell.nix | 26 ++++++++++++++++++++++++++ reason.json | 2 +- shell.nix | 14 -------------- 8 files changed, 79 insertions(+), 37 deletions(-) create mode 100644 nix/shell.nix delete mode 100644 shell.nix diff --git a/HISTORY.md b/HISTORY.md index f46987f7d..66a77b990 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 3.8.2 + +- Fix magic numbers for OCaml 5.0 (@anmonteiro) [#2671](https://github.com/reasonml/reason/pull/2671) + ## 3.8.1 - (Internal) Rename: Reason_migrate_parsetree -> Reason_omp (@ManasJayanth) [#2666](https://github.com/reasonml/reason/pull/2666) diff --git a/dune b/dune index df970e92d..4e1cfd734 100644 --- a/dune +++ b/dune @@ -1 +1 @@ -(ignored_subdirs (node_modules js)) +(dirs :standard \ node_modules js) diff --git a/flake.lock b/flake.lock index 10e298e39..123e7cfaa 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1656065134, - "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "owner": "numtide", "repo": "flake-utils", - "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "flake-utils_2": { "locked": { - "lastModified": 1656065134, - "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "owner": "numtide", "repo": "flake-utils", - "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "type": "github" }, "original": { @@ -30,17 +30,32 @@ "type": "github" } }, + "nix-filter": { + "locked": { + "lastModified": 1661201956, + "narHash": "sha256-RizGJH/buaw9A2+fiBf9WnXYw4LZABB5kMAZIEE5/T8=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "3b821578685d661a10b563cba30b1861eec05748", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, "nixpkgs": { "inputs": { "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1656344450, - "narHash": "sha256-5WV2A3Mx7SIaKHlGslF5bs1vL/YkMfg62dk+Vvdhhl8=", + "lastModified": 1665818387, + "narHash": "sha256-5+Y365wu1RihKrth4KRnDepfIjlmD3f5fOby5NF9lfI=", "owner": "anmonteiro", "repo": "nix-overlays", - "rev": "8c482b47184b5e4042e4af359bb46d35530206c8", + "rev": "02c592db888ad96c37b0262956c01e1f6c0d7a0a", "type": "github" }, "original": { @@ -51,23 +66,24 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1655983783, - "narHash": "sha256-0h1FzkYWei24IdKNpCX93onkF/FMiXQG8SdEbTc0r8A=", + "lastModified": 1665739725, + "narHash": "sha256-+4gT1fslLg/EN1nnCzIxVSpPpgCME55zUYVkwmXiAS4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6141b8932a5cf376fe18fcd368cecd9ad946cb68", + "rev": "a114755d05c1a590ece2e3ecff31e43e07334b5e", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "6141b8932a5cf376fe18fcd368cecd9ad946cb68", + "rev": "a114755d05c1a590ece2e3ecff31e43e07334b5e", "type": "github" } }, "root": { "inputs": { "flake-utils": "flake-utils", + "nix-filter": "nix-filter", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index b6e1f2453..095e29a66 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,11 @@ { description = "Nix Flake for ReasonML"; + inputs.nix-filter.url = "github:numtide/nix-filter"; inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.nixpkgs.url = "github:anmonteiro/nix-overlays"; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, nix-filter }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}".extend (self: super: { @@ -12,7 +13,17 @@ }); in rec { - packages.default = pkgs.callPackage ./nix { }; - devShells.default = pkgs.callPackage ./shell.nix { }; + packages.default = pkgs.callPackage ./nix { + nix-filter = nix-filter.lib; + }; + devShells = { + default = pkgs.callPackage ./nix/shell.nix { + reason = packages.default; + }; + release = pkgs.callPackage ./nix/shell.nix { + reason = packages.default; + release-mode = true; + }; + }; }); } diff --git a/nix/default.nix b/nix/default.nix index 5c17beafa..257c99aec 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs, nix-filter }: let inherit (pkgs) stdenv lib ocamlPackages; @@ -9,10 +9,9 @@ ocamlPackages.buildDunePackage { pname = "reason"; version = "0.0.1-dev"; - src = lib.filterGitSource { - src = ./..; - dirs = [ "scripts" "src" "formatTest" ]; - files = [ "dune" "dune-project" "reason.opam" "rtop.opam" ]; + src = nix-filter.filter { + root = ./..; + include = [ "dune" "dune-project" "reason.opam" "rtop.opam" "scripts" "src" "formatTest" ]; }; useDune2 = true; diff --git a/nix/shell.nix b/nix/shell.nix new file mode 100644 index 000000000..0bb704648 --- /dev/null +++ b/nix/shell.nix @@ -0,0 +1,26 @@ +{ mkShell +, ocamlPackages +, reason +, stdenv +, lib +, cacert +, curl +, git +, release-mode ? false +}: + +mkShell { + inputsFrom = [ reason ]; + buildInputs = with ocamlPackages; [ + utop + merlin + ] + ++ (if release-mode then [ + cacert + curl + ocamlPackages.dune-release + git + ] else [ ]) + ; + +} diff --git a/reason.json b/reason.json index b439be88e..9931c95a9 100644 --- a/reason.json +++ b/reason.json @@ -1,6 +1,6 @@ { "name": "@esy-ocaml/reason", - "version": "3.8.1", + "version": "3.8.2", "license": "MIT", "description": "Native Compiler Support for Reason: Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems", "repository": { diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 07b63c7bd..000000000 --- a/shell.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ callPackage, lib, mkShell, ocamlPackages }: - -let - reason = callPackage ./nix { }; - -in - -mkShell { - inputsFrom = [ reason ]; - buildInputs = with ocamlPackages; [ - utop - merlin - ]; -}