[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 31, 2018, 1:57 AM

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.

Assignee

Unassigned

Reporter

Alex Miller

Labels

Approval

Triaged

Patch

None

Affects versions

Priority

Minor