rescript-lang / rescript-lang/reanalyze
Module incorrectly marked dead when contains non-dead type and submodule definitions
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 281
- Forks
- 22
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 7
Description
Running reanalyze https://github.com/rescript-association/reanalyze/commit/389dd682223201b42c33e5c444e5c79e0805adad on Goblint https://github.com/goblint/analyzer/commit/a544002114324a207df72f9e79eb656c3ebe7b5b revealed the following.
In the terminal output there's a dead module warning:
Warning Dead Module
File "./gobview/src/state/gvMessages.ml", line 1, characters 0-0
+gvMessages is a dead module as all its items are dead.
Warning Dead Value
File "./gobview/src/state/gvMessages.ml", lines 22-28, characters 0-18
+filter_by_line is never used
<-- line 22
List.filter pred [@@dead "+filter_by_line"]
Although the only value filter_by_line is indeed dead, it also contains a type t and module Message which are not. Therefore the GvMessages module should not be considered dead overall.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the warning with reanalyze commit 389dd682 on Goblint commit a544002, focusing on gobview/src/state/gvMessages.ml. Inspect how dead-module status accounts for values, types, and submodules; done when gvMessages is not reported dead while filter_by_line remains reported as dead.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100