Skip to content

Commit

Permalink
Merge pull request #910 from herbie-fp/fix-save-session-2
Browse files Browse the repository at this point in the history
Fixed a bug related to handling invalid job IDs when `--save-session` is enabled
  • Loading branch information
pavpanchekha authored Jul 19, 2024
2 parents 64d4e67 + cb5fa2d commit 5e640bd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/web/demo.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@

(define-coercion-match-expander hash-arg/m
(λ (x)
(cond
[(*demo-output*)
(not (directory-exists? (build-path (*demo-output*) x)))]
[else
(let ([m (regexp-match #rx"^([0-9a-f]+)\\.[0-9a-f.]+" x)])
(and m (completed-job? (second m))))]))
(and
(not
(and (*demo-output*) ; If we've already saved to disk, skip this job
(directory-exists? (build-path (*demo-output*) x))))
(let ([m (regexp-match #rx"^([0-9a-f]+)\\.[0-9a-f.]+" x)])
(and m (completed-job? (second m))))))
(λ (x)
(let ([m (regexp-match #rx"^([0-9a-f]+)\\.[0-9a-f.]+" x)])
(get-results-for (if m (second m) x)))))
Expand Down

0 comments on commit 5e640bd

Please sign in to comment.