Skip to content

Commit

Permalink
Update Ocaml to 4.13.1 (#28)
Browse files Browse the repository at this point in the history
* Update Ocaml to 4.13.1

* Fix make coverage for new version of bisect-ppx-report

* Update changelog to have correct version
  • Loading branch information
ryanaveo authored Mar 9, 2022
1 parent a68a01c commit a2f45d3
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Ocaml
uses: avsm/setup-ocaml@v1.1.10
with:
ocaml-version: 4.04.2
ocaml-version: 4.13.1
- name: Setup Python 2.7
uses: actions/setup-python@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ node_modules
.DS_Store
env*
*.pickle
_coverage/
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ register:
$(MAKE) -C src register

install:
@ln -fs $(NEAL) /usr/local/bin/neal
@echo installed at /usr/local/bin/neal
@echo neal is at $(NEAL)

coverage:
@COVERAGE=1 $(MAKE) test
@opam exec -- bisect-ppx-report -html src/core/_build/coverage/ $$(find . -name _build -type d -exec echo -I {} \;) $$(find . -name 'bisect*.out')
@find . -name 'bisect*out' | xargs rm
@opam exec -- bisect-ppx-report html $$(find . -name '*.coverage') $$(find . -name _build -type d -exec echo --source-path {} \;)
@find . -name '*.coverage' | xargs rm -r
9 changes: 7 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
Changelog
=========

0.2.5 (Unreleased)
------------------
0.2.6
------
- Updates Ocaml to 4.13.1 to support building on arm64

0.2.5
------
- Add support for parsing Swift concurrency syntax

0.2.4
-----
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
# built documents.
#
# The short X.Y version.
version = u'0.2.4'
version = u'0.2.6'
# The full version, including alpha/beta/rc tags.
release = u'0.2.4'
release = u'0.2.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ The recommended way of installing NEAL is through `Homebrew <https://brew.sh>`_,
Installing from source
++++++++++++++++++++++

To build and install NEAL from source, make sure you have `OPAM`__ installed and that you're using OCaml 4.04 or later.
To build and install NEAL from source, make sure you have `OPAM`__ installed and that you're using OCaml 4.13.1 or later.

.. code-block:: bash
$ brew install opam
$ opam init
$ opam switch 4.04.2
$ opam switch 4.13.1
$ eval "$(opam config env)"
__ https://opam.ocaml.org/
Expand Down
2 changes: 1 addition & 1 deletion src/core/driver/fs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

module StringSet = Set.Make(String)

let realpath = Core.Std.Filename.realpath
let realpath = Core.Filename.realpath

let join_path dir path =
Filename.concat dir path |> realpath
Expand Down
4 changes: 2 additions & 2 deletions src/core/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let main rules providers reporters stdin filelist print_ast strict strict_parse
let files' =
match filelist with
| None -> files
| Some file -> Core.Std.In_channel.read_lines file
| Some file -> Core.In_channel.read_lines file
in
let rule_step =
match rules with
Expand Down Expand Up @@ -110,7 +110,7 @@ let main rules providers reporters stdin filelist print_ast strict strict_parse
let neal =
let doc = "Not Exactly A Linter" in
Term.(ret (const main $ rules $ providers $ reporters $ stdin $ filelist $ print_ast $ strict $ strict_parse $ files)),
Term.info "neal" ~version:"0.2.4" ~doc
Term.info "neal" ~version:"0.2.6" ~doc

let test =
let doc = "A list of rules to be tested" in
Expand Down
4 changes: 2 additions & 2 deletions src/core/neal.ml
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ end
module Utils = struct
let neal_root =
IFDEF RELATIVE_LIB_PATH THEN
let exec_path = Core.Std.Filename.realpath Sys.executable_name in
let exec_path = Core.Filename.realpath Sys.executable_name in
let _build = Filename.dirname exec_path in
Filename.concat _build RELATIVE_LIB_PATH
ELSE
IFDEF LIB_PATH THEN
LIB_PATH
ELSE
let exec_path = Core.Std.Filename.realpath Sys.executable_name in
let exec_path = Core.Filename.realpath Sys.executable_name in
let _build = Filename.dirname exec_path in
let neal = Filename.dirname _build in
Filename.dirname neal
Expand Down
2 changes: 1 addition & 1 deletion src/opam/META
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description = "Automate your code reviews with custom syntactic rules"
version = "0.2.4"
version = "0.2.6"

package "fs" (
requires = "core str"
Expand Down
6 changes: 3 additions & 3 deletions src/opam/opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
opam-version: "1.2"
name: "neal"
version: "0.2.4"
version: "0.2.6"
maintainer: "Tadeu Zagallo <tadeu@uber.com>"
author: "Tadeu Zagallo <tadeu@uber.com>"
license: "MIT"
Expand All @@ -16,7 +16,7 @@ depends: [
"core"
"menhir"
"yojson"
"bisect_ppx" { = "1.3.4" }
"bisect_ppx" { = "2.8.0" }
"bisect_ppx-ocamlbuild"
]
build: [
Expand All @@ -34,4 +34,4 @@ remove: [
["rm" "-r" "%{prefix}%/lib/neal/reporters"]
["opam" "exec" "--" "ocamlfind" "remove" "neal"]
]
available: [ ocaml-version >= "4.04.0" ]
available: [ ocaml-version >= "4.13.1" ]

0 comments on commit a2f45d3

Please sign in to comment.