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

Add clerk/resolve-aliases and make alias resolution explicit #410

Merged
merged 6 commits into from Feb 8, 2023

Conversation

mk
Copy link
Member

@mk mk commented Feb 8, 2023

This makes the alias resolution explicit via a new clerk/resolve-aliases function. The recommendation is now to use the full namespace in :render-fns or make the conversion explicit using clerk/resolve-aliases.

I've also removed the automatic resolution from ->viewer-fn/eval because it would depend on the evaluation context (a notebook that defines a viewer using aliases would render correctly but things could break if that viewer is being reused from another namespace that doesn't define the same aliases).

Lastly we've dropped the previously defined aliases:

{'j 'applied-science.js-interop
 'reagent 'reagent.core
 'v 'nextjournal.clerk.viewer
 'p 'nextjournal.clerk.parser}

We should think about temporarily bringing them back and log a warning instead before the next release, so folks have time to migrate but I'd like to make sure all our notebooks aren't using them anymore.

Screen Shot 2023-02-08 at 14 42 48

@mk mk merged commit 47a5d91 into main Feb 8, 2023
@mk mk deleted the explicit-aliases branch February 8, 2023 15:03
@mk mk mentioned this pull request Feb 8, 2023
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.

None yet

1 participant