Skip to content

Latest commit

 

History

History
230 lines (145 loc) · 8.15 KB

Changes.md

File metadata and controls

230 lines (145 loc) · 8.15 KB

2.25.1

  • Fix fatal error for OCaml 5.2.

2.25.0

  • Support OCaml 5.2.

2.24.0

  • Add -native-build-target option to explicitly specify a build target path for native OCaml projects.
  • Support OCaml 5.1.

2.23.0

  • Add command line option -set-exit-code to return an exit code (1) when at least one issue is reported.

2.22.0

  • 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.

2.21.1

  • Run -config by default
  • Run dce when "reanalyze" is not present in bsconfig.json.

2.21.0

  • 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" in bsconfig.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.

2.19.0

  • Don't report redundant optional arguments on functions annotated @live.

2.18.0

  • Don't report unused optional arguments for functions annotated @live or @genType.
  • Add support for @live or dead 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.

2.17.0

  • Give explicit error message for ast cases not implemented.

2.16.0

  • Limited support for project with dune namespaces: when Mylib.Foo is not found try Foo.

2.15.0

  • 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.

2.14.0

  • Fix issue where type dependencies could get lost if the last file processed is an interface file.
  • Exception analysis: Bytes.sub_string throws.

2.13.0

  • 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).

2.12.0

  • Support OCaml 4.11 and 4.12.

2.11.0

  • Exception Analysis: add basic support for module aliases (e.g. module Array = Belt.Array).

2.10.0

  • 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 () = ... and let _ = ....

2.9.0

  • Model exit(...) as raising a fictional exception called exit.
  • Fix wording of error message for redundant exception annotation when the function raises nothing.

2.8.0

  • Add DCE support for .res and .resi files with new bucklescript syntax.

2.7.0

  • 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.

2.6.0

  • In -debug mode, print Sourcefile:path/to/File.re for each .cmt loaded. This can be used to decide the current directory to call renanalyze from in dune projects.

2.5.0

  • Turn on the checks for unused optional arguments, and dead module, in dce. No need for the -experimental flag anymore.

2.3.0

  • 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.

2.2.0

  • Fix issue in experimental analysis for unused optional named arguments where foo(~x=?) was not recognized.

2.1.0

  • 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.

1.16.0

  • Only toplevel values are considered live when they have side-effects.
  • Report a warning when a redundant @doesNotRaise annotation is used.

1.15.0

  • 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.

1.14.0

  • 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 name genericException 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.

1.13.0

  • 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.

1.12.0

  • 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.

1.11.0

  • 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 files src/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.

1.10.0

  • Exception: Add warning when raise or raise_notrace are used not in a direct call.
  • Exception: support raise @@ Exn and Exn |> raise.
  • Exception: model Js.Json.
  • Exception: model bs-json.

1.9.0

  • Exception analysis: Model exceptions for Array, Buffer, Bytes, Char, Filename, Hashtbl, Pervasives, Str, String.

1.8.0

  • First feature-complete exception analysis with -exception (bucklescript) and -exception-cmt for native.

1.7.0

  • Early preview of exception analysis with -exception (bucklescript) and -exception-cmt for native.

1.6.0

  • 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 variable Debug.
  • Add command-line option -write and discontinue environment variable Write.

1.5.0

  • Work around issue with flushing when printing first location.

1.4.0

  • Always use OCaml's location format, which is picked up automatically by most tooling.
  • Add warning emitted when a live item is annotated @dead.

1.3.0

  • Add command-line option -live-names this,that to treat items this and that 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.

1.2.0

  • 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.

1.1.0

  • More robust detection of file names (don't rely on the name from the .cmt file).
  • Add support for building with OCaml 4.08.

1.0.0

Initial release.