Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential breakage #72

Open
NoahTheDuke opened this issue Sep 15, 2023 · 0 comments · May be fixed by #73
Open

Potential breakage #72

NoahTheDuke opened this issue Sep 15, 2023 · 0 comments · May be fixed by #73

Comments

@NoahTheDuke
Copy link

Setup

CLJ-1929: "Literal collections are tagged as IPersistentVector, IPersistentMap, etc and as constant expressions won’t preserve type hints. If these collections are then used in a Java interop call, there is no way to indicate the desired type to choose a method overload between Collection and some other type."

This ticket has a patch that is on the shortlist for inclusion to 1.12.

Issue

As I commented in the issue, the strict version of the patch breaks Potemkin's import-* macros. Given Potemkin's prominence within the community, it seems reasonable to me to proactively fix the issue.

NoahTheDuke added a commit to NoahTheDuke/potemkin that referenced this issue Sep 15, 2023
If a var has tag metadata attached to the var symbol (not on the vector, as is
the preferred method for return types in functions), it will be resolved when
`import-*` is called during read time. This currently doesn't break anything,
but if the proposed Clojure patch for [CLJ-1929][CLJ-1929] is accepted, then
code that's so tagged will break.

Includes a test that will break without the associated change if the Clojure
patch is accepted.

Closes [clj-commons#72][clj-commons#72]

[CLJ-1929]: https://clojure.atlassian.net/browse/CLJ-1929
[clj-commons#72]: clj-commons#72
@NoahTheDuke NoahTheDuke linked a pull request Sep 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant