Skip to content

Commit

Permalink
Fix misleading CLI output about verification
Browse files Browse the repository at this point in the history
Ref. #1295, eng/recordflux/RecordFlux#1522
  • Loading branch information
treiher committed Jan 26, 2024
1 parent ea2f958 commit d321024
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fatal error when unsupported base is used in numeric literal (eng/recordflux/RecordFlux#1470)
- Missing diagnostics provided by language server
- `--split-disjunctions` options of `rflx validate`
- Misleading CLI output about verification (AdaCore/RecordFlux#1295, eng/recordflux/RecordFlux#1522)

## [0.17.0] - 2024-01-03

Expand Down
13 changes: 6 additions & 7 deletions rflx/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,17 @@ def checked(
declarations: list[top_level_declaration.TopLevelDeclaration] = []

for d in self.declarations:
log.info("Verifying %s", d.identifier)
try:
unverified = d.checked(declarations, skip_verification=True)
digest = Digest(unverified)
checked = (
unverified
if cache.is_verified(digest)
else d.checked(declarations, workers=workers)
)
if cache.is_verified(digest):
checked = unverified
else:
log.info("Verifying %s", d.identifier)
checked = d.checked(declarations, workers=workers)
declarations.append(checked)
cache.add_verified(digest)
except RecordFluxError as e:
except RecordFluxError as e: # noqa: PERF203
error.extend(e)

return Model(declarations, error)
Expand Down

0 comments on commit d321024

Please sign in to comment.