Welcome! Please see the About page for a little more info on how this works.

0 votes
in tools.reader by
retagged by

Currently, the function clojure.tools.reader.impl.commons/parse-symbol is fairly lax with what it allows, both in general and with regard to the forthcoming Clojure 1.12 Array class notation.

user=> (mapv trc/parse-symbol ["String/1" "String/-1" "String/11" "String/1a"])
[nil ["String" "-1"] nil nil]

This is different than the current implementation, which only accepts the first. Is there any interest in updating it to be stricter for the new notation?

by
Just to note, the syntax is String/1 now, not String::1, but yes only String/1 should be valid. I'm not sure why String/11 is invalid? String/9 seems to be the maximum number of dimensions possible.
by
Oops, you're right, I got the jira tickets mixed up. I'll update the question.
by
We only support a single digit for parsing (arrays of dimension 1-9).

3 Answers

+1 vote
by

FYI unless people contribute patches first, I plan to do a round to update tools.reader/analyzer to bring them up to compatibility with 1.12, but not while things are still in alpha and may still change.

by
i wrote a patch because i'm eager and had some free time, but that makes sense.
0 votes
by

Will be updated, haven't gotten to it yet.

0 votes
by
...