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

Metadata isn't being preserved on conj #173

Open
djblue opened this issue Jan 18, 2025 · 1 comment
Open

Metadata isn't being preserved on conj #173

djblue opened this issue Jan 18, 2025 · 1 comment

Comments

@djblue
Copy link
Contributor

djblue commented Jan 18, 2025

In jank:

% ./build/jank repl
Bottom of clojure.core
clojure.core=> (meta ^:meta {})
{:meta true}
clojure.core=> (meta (conj ^:meta {} [:k :v]))
nil
clojure.core=> 

In clj:

% clj
Clojure 1.12.0
user=> (meta ^:meta {})
{:meta true}
user=> (meta (conj ^:meta {} [:k :v]))
{:meta true}
user=> 

I haven't investigated further, but this might apply to other operations and collection types.

@jeaye
Copy link
Member

jeaye commented Jan 18, 2025

Yep, you're right about this. Meta preservation is likely missing in a lot of places, since metadata was implemented pretty late. We do have all of the behaviors for it now, though. Just need to identify where it's needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants