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

Distinguish between symbols and strings in humanize #1031

Merged
merged 2 commits into from
Apr 20, 2024

Conversation

frenchy64
Copy link
Collaborator

@frenchy64 frenchy64 commented Apr 2, 2024

For clj use pr-str, for cljs use str.

@ikitommi ikitommi merged commit 32cc8c6 into metosin:master Apr 20, 2024
9 checks passed
@ikitommi
Copy link
Member

Thanks!

@ikitommi ikitommi mentioned this pull request Apr 20, 2024
@danielcompton
Copy link
Contributor

@frenchy64 could you explain a bit more about why you made this change? Why can’t CLJ and CLJS both use pr-str?

We have CLJC tests which include Malli error messages. Now we need to use reader conditionals on the error message to have them pass in both CLJS and CLJ.

@frenchy64
Copy link
Collaborator Author

frenchy64 commented Jun 1, 2024 via email

@liwp
Copy link

liwp commented Jul 2, 2024

To close the loop here: we ended up overriding malli.error/-pr-str in our tests to get consistent output:

(t/use-fixtures
  :once
  (fn [f]
    (with-redefs [me/-pr-str pr-str]
      (f))))

A bit naughty, but keeps reader conditionals away from the tests.

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.

4 participants