Skip to content

Do not create remove_bad_files.sh#86

Open
fantazio wants to merge 2 commits into
LexiFi:masterfrom
fantazio:error_msg
Open

Do not create remove_bad_files.sh#86
fantazio wants to merge 2 commits into
LexiFi:masterfrom
fantazio:error_msg

Conversation

@fantazio

Copy link
Copy Markdown
Collaborator

Instead of creating the script and suggesting to run it, the following error message is printed after scanning the files and before the reports (example appearing on Goblint):

*** WARNING: 14 files cannot be read. Run with `--verbose` for more details.

When running with --verbose, the errors are printed on stderr during the scan, along with the Scanning messages,
with messages prefixed with "ERROR: ". On Goblint again, part of the output is:

Scanning interface from _build/default/tests/util/.yamlWitnessStrip.eobjs/byte/dune_site__Dune_site_data.cmt
ERROR: _build/default/tests/util/.yamlWitnessStrip.eobjs/byte/dune_site__Dune_site_data.cmt: missing cmi_sign
Scanning implementation from _build/default/tests/util/.yamlWitnessStrip.eobjs/byte/dune_site__Dune_site_data.cmt
Scanning interface from _build/default/tests/util/.yamlWitnessStrip.eobjs/byte/dune__exe__YamlWitnessStripDiff.cmti
Scanning implementation from _build/default/tests/util/.yamlWitnessStrip.eobjs/byte/dune__exe__YamlWitnessStripDiff.cmt

Also update the error message for cmt read failures to a more informative one

-<cmt_filepath>: error reading file
+<cmt_filepath>: invalid magic number. Tip: the file must be compiled with the same OCaml version as the dead_code_analyzer.

Fix issue #85.

fantazio added 2 commits June 27, 2026 17:05
Instead, a warning message is printed on stderr, suggesting to run with
`--verbose`. The message also specifies the number of impacted files.

When running with `--verbose`, the errors are printed during the scan,
with messages prefixed with "ERROR: ".

Fix issue LexiFi#85.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant