Skip to content

Comments

Fix #770: clerk/row metadata can't be added to a def#800

Open
borkdude wants to merge 9 commits intomainfrom
issue-770
Open

Fix #770: clerk/row metadata can't be added to a def#800
borkdude wants to merge 9 commits intomainfrom
issue-770

Conversation

@borkdude
Copy link
Collaborator

@borkdude borkdude commented Jan 20, 2026

Fixes:

  • docstring should say: :var-from-def? instead of :nextjournal.clerk/var-from-def
  • unwrapping happens on return value (after applying function viewer)

Added tests for:

  • A function viewer that gets applied to a var-from-def value
  • A function that opts out of unwrapping

It's this part in particular that crashed before:

 (testing "function viewer with var-from-def"
      (is (= [{:nextjournal.clerk/var-from-def #'nextjournal.clerk.viewer-test/my-test-var2, :nextjournal.clerk/var-snapshot 1}]
             (apply+get-value {:nextjournal/value {:nextjournal.clerk/var-from-def #'my-test-var2
                                                   :nextjournal.clerk/var-snapshot 1}
                               :nextjournal/viewer v/row}))))

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.

1 participant