We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Looks like the parser is losing the metadata along the way.
(def id-schema [:and ;; Nested :and to be able to add metadata to generated content [:and {:gen/fmap #(with-meta % {:kw-id true})} [:cat {:gen/fmap vec} :keyword [:+ :string]] vector?] [:fn #(:kw-id (meta %))] ; <- causes issues with the parser? ]) (meta (mg/generate id-schema)) ;=> {:kw-id true} (m/parse id-schema (mg/generate id-schema)) ;=> :malli.core/invalid
If you comment out the metadata test and try again, it works:
(def id-schema [:and ;; Nested :and to be able to add metadata to generated content [:and {:gen/fmap #(with-meta % {:kw-id true})} [:cat {:gen/fmap vec} :keyword [:+ :string]] vector?] ;[:fn #(:kw-id (meta %))] ; <- causes issues with the parser? ]) (m/parse id-schema (mg/generate id-schema)) ;=> [:+_8X.u ["W3Iz5qe" "9r01WwNdDl91Gdzyk3QF7" "45BD4Z8qx6xa7ab5E5JbU6mLAv" "r01uuAvF6cmet7Kc964F7L" "BoUJv" "0q445EvwmMBj3JlaTYmT0n"]]
The text was updated successfully, but these errors were encountered:
There hasn't been promised about retaining meta-data, but there could and should be.
Sorry, something went wrong.
No branches or pull requests
Looks like the parser is losing the metadata along the way.
If you comment out the metadata test and try again, it works:
The text was updated successfully, but these errors were encountered: