[go: up one dir, main page]

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

[Fix #341] Remove ^:const metadata prior to processing a given form #363

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

vemv
Copy link
Collaborator
@vemv vemv commented Apr 1, 2021

^:const is not part of any public API described in https://github.com/clojure/clojure-site.

However usage of it can be still found in the wild, perhaps influenced by past knowledge.

#341 showed that attempting to process a defn having ^:const would throw an exception.
This commit proposes removing that piece of metadata, since it doesn't alter semantics and saves the effort of investigating a more intrincate integration with tools.analyzer (for what I believe is not a public API anyway).

It's worth noting that https://clojure.org/reference/compilation#directlinking is a public API,
and something that can be used in production environments instead of ^:const, without fearing a clash with Eastwood whatsoever.

Fixes #341

  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if eg adding a new linter)

…n form

`^:const` is not part of any public API described in https://github.com/clojure/clojure-site.

However usage of it can be still found in the wild, perhaps influenced by past knowledge.

jonase#341 showed that attempting to process a defn having ``^:const` would throw an exception.
This commit proposes removing that piece of metadata, since it doesn't alter semantics and saves the effort of investigating
a more intrincate integration with tools.analyzer (for what I believe is not a public API anyway).

It's worty noting that https://clojure.org/reference/compilation#directlinking **is** a public API,
and something that can be used in production environments instead of `^:const`, without fearing a clash with Eastwood whatsoever.

Fixes jonase#341
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 this pull request may close these issues.

Exception on a function with ^:const
2 participants