[spec] 'inst?' spec generator produces unreadable instants

Description

The spec generator associated with inst? may produce instants that are technically valid but cannot be read back (and also are not practical in reality).

Minor issue, but I ran into this while interacting with inst generator/generated values in the REPL.

Environment

Clojure 1.9.0
org.clojure/spec.alpha 0.1.143
org.clojure/test.check 0.9.0

Activity

Show:
Enzzo Cavallo
February 20, 2019, 1:20 PM

There is some info about the limits of reader/printer in
I catch this problem because I'm generating data and `pr-str` / `read-string` over the wire.

David Bürgin
May 12, 2018, 9:53 AM

This problem gets worse when the inst generated is in the BC era. In that case, not even can the inst potentially not be read back, but since there is no indication of the ‘negative year’, information is lost.

Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

David Bürgin

Labels

Approval

Triaged

Priority

Minor

Affects versions