[core.specs] refer-clojure and import specs are too limited in quote support

Description

The refer-clojure spec added in CLJ-2062 supports only limited quoting.

In Clojure 1.8, these are both allowed:

But in 1.9/1.10, the first is valid but the second will throw:

Cause: This is due to the way the quoted spec is defined, allowing only a quoted list rather than a quoted list of symbols or a list of quoted symbols. A similar issue is seen with import - (import ['java.util 'Date]) fails in a similar way, but it's uncommon for people to invoke import by quoting the internal symbols rather than the outer list (import '[java.util Date]).

Proposed: To match support in 1.8, would need specs that include both quoted lists of symbols and lists of quoted symbols.

Environment

None

Activity

Show:
Alex Miller
December 30, 2018, 2:57 PM

Due to the rarity of this usage pattern (this is the first report in over 2 years since this was added), I'm going to mark this minor priority.

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

Assignee

Unassigned

Reporter

Alex Miller

Labels

Approval

Triaged

Priority

Minor

Affects versions