- Fix fatal error for OCaml 5.2.
- Support OCaml 5.2.
- Add
-native-build-target
option to explicitly specify a build target path for native OCaml projects. - Support OCaml 5.1.
- Add command line option
-set-exit-code
to return an exit code (1) when at least one issue is reported.
- Add
-json
option to emit descriptions of issues, and actions to resolve them. For editor integration. - Work around issue with location of variant cases in type declarations.
- Run
-config
by default - Run
dce
when"reanalyze"
is not present inbsconfig.json
.
- Add support for
[@warning "-unused-value-declaration"]
. - Don't report on dead values inside a function annotated
@dead
. - Fix issue with punned record expressions in OCaml projects.
- Add command-line
-config
to read configuration settings under"reanalyze"
inbsconfig.json
. Example:
{
"reanalyze": {
"analysis": ["dce", "exception"],
"suppress": ["src/ToSuppress.res"],
"unsuppress": ["this", "that"]
}
}
- Allow lists and arrays as payloads e.g. for
@raises([A,B])
. - Improve printing of exception annotations in error messages.
- Fix issue where the current file would be mistakenly reported dead and with empty name, when it contains an inner module which is dead and a toplevel exception.
- Don't report redundant optional arguments on functions annotated
@live
.
- Don't report unused optional arguments for functions annotated
@live
or@genType
. - Add support for
@live
ordead
at toplevel in a type declaration. Equivalent to annotating all the record fields / variant cases. - Turn off dead code reporting on externals by default. Add option
-externals
to turn back on.
- Give explicit error message for ast cases not implemented.
- Limited support for project with dune namespaces: when
Mylib.Foo
is not found tryFoo
.
- Exception analysis: also report on exceptions in toplevel expressions, not just variable bindings.
- Exception analysis: add support for Belt modules.
- Termination analysis: add support for try blocks.
- Termination analysis: add support for array creation.
- Termination analysis: add support for polymorphic variant creation.
- Fix issue where type dependencies could get lost if the last file processed is an interface file.
- Exception analysis: Bytes.sub_string throws.
- Don't report on module bindings coming from the type of first-class modules (see #107).
- Fix issue where
emptyArray
was reported unused for lowercase components without children. (See #85).
- Support OCaml 4.11 and 4.12.
- Exception Analysis: add basic support for module aliases (e.g.
module Array = Belt.Array
).
- Exception analysis: add support for inner modules.
- Exception analysis: correctly hide location of caught exceptions when other instances of the same exception are reported.
- Exception analysis: report on toplevel bindings of the form
let () = ...
andlet _ = ...
.
- Model
exit(...)
as raising a fictional exception calledexit
. - Fix wording of error message for redundant exception annotation when the function raises nothing.
- Add DCE support for
.res
and.resi
files with new bucklescript syntax.
- Fix
-live-paths
in bucklescript projects where absolute paths are used internally. - Add command-line option
-exclude-paths
. - Work around issue where
unsafe-expr
, generated by buklescript, was reported dead.
- In
-debug
mode, printSourcefile:path/to/File.re
for each.cmt
loaded. This can be used to decide the current directory to callrenanalyze
from indune
projects.
- Turn on the checks for unused optional arguments, and dead module, in dce. No need for the
-experimental
flag anymore.
- DCE: add check Warning Redundant Optional Argument when an optional named argument is always supplied. Then there is no reason for it to be an optional argument.
- Fix issue in experimental analysis for unused optional named arguments where
foo(~x=?)
was not recognized.
- Add -experimental command-line to turn on experimental analyses.
- New analysis for unused optional named arguments, under the
-experimental
flag. - New analysis for dead modules, under the
-experimental
flag.
- Only toplevel values are considered live when they have side-effects.
- Report a warning when a redundant @doesNotRaise annotation is used.
- Report analysis stats at the end.
- Issue dead exception reports as
Warning Dead Exception
. - Dead exception: fix location position for
-write
. - Add command-line options
-all
and-all-cmt
to run all the analyses at once.
- CLI: rename
-blacklist
to-suppress
and-whitelist
to-unsuppress
. This should clarify the semantics. - When a generic exception is raised, as in
raise(exn)
report as if a specific exception of namegenericException
were raised. Can be suppressed just like real exceptions. - Add new check for dead exceptions: that is exceptions defined but never raised directly or indirectly. An indirect raise (undecidable) is approximated by checking if the value is passed around in any way.
- Exception Analysis: model functions from Yojson.Basic.Util.
- Exception Analysis: fix issue with OCaml >= 4.08 where
raise
was not recognized. - Exception Analysis: fix issue with OCaml >= 4.08 where models of the standard library were not recognized.
- Exception Analysis: print all the locations where a given exception is raised, not just one.
- DCE: rely on latest Bucklescritpt (7.3.2) and ReasonReact (0.8.0) to remove hack which fixes locations in code generated by the React PPX.
- Add command-line options
-blacklist
and-whitelist
that apply to all the analyses. Example:../reanalyze.exe -exception -blacklist src -whitelist src/Ex
will only show results for filessrc/Ex*
. The analyses are not affected (e.g. transitively dead code), only the reporting is. - Exception analysis: add support for
@doesNotRaise
to indicate that an expression does not raise any exceptions (to suppress possible analysis reports). - Exception Analysis: add model for
Yojson.Basic.from_string
.
- Exception: Add warning when
raise
orraise_notrace
are used not in a direct call. - Exception: support
raise @@ Exn
andExn |> raise
. - Exception: model
Js.Json
. - Exception: model
bs-json
.
- Exception analysis: Model exceptions for
Array
,Buffer
,Bytes
,Char
,Filename
,Hashtbl
,Pervasives
,Str
,String
.
- First feature-complete exception analysis with
-exception
(bucklescript) and-exception-cmt
for native.
- Early preview of exception analysis with
-exception
(bucklescript) and-exception-cmt
for native.
- When file paths are implicit, e.g.
Foo.re
turn them into./Foo.re
to help editor integration. - Add command-line option
-debug
and discontinue environment variableDebug
. - Add command-line option
-write
and discontinue environment variableWrite
.
- Work around issue with flushing when printing first location.
- Always use OCaml's location format, which is picked up automatically by most tooling.
- Add warning emitted when a live item is annotated @dead.
- Add command-line option
-live-names this,that
to treat itemsthis
andthat
as globally live. - Support
@warning "-32"
in addition@ocaml.warning "-32"
to mean@live
. - Add command-line option
live-paths prefix/of/path1,prefix/of/path2
to treat all items in the path prefixes as live.
- Turn off reporting on
_
as it interferes with the@deriving
ppx. - Add option to report types dead only in the interface, now off by default.
- Support
@ocaml.warning "-32"
to mean@live
. - Capture dependencies between types in interface and implementation files.
- More robust detection of file names (don't rely on the name from the .cmt file).
- Add support for building with OCaml 4.08.
Initial release.