Git Product home page Git Product logo

Comments (5)

bhb avatar bhb commented on August 24, 2024

@kelvinqian00 Thanks for the bug report and repro! I'll take a look.

from expound.

bhb avatar bhb commented on August 24, 2024

@kelvinqian00 I'm having a hard time reproing this. I tried the following specs and I can't seem to get the results you showed above.

(s/and #(< 0 (count %)) :keys-spec/user)
(s/or :nil nil?
      :user :keys-spec/user)

I'm likely misunderstanding some detail of your repro. Can you should the spec you used to get the result above? Thanks!

from expound.

kelvinqian00 avatar kelvinqian00 commented on August 24, 2024

Ah, sorry for the lack of clarity. When I meant "when you wrap the user spec in an s/and or an s/or" I meant wrap the predicates that make up :keys-spec/user in another spec, not the keyword. For example:

(s/def :keys-spec/user (s/and (s/keys :req [:keys-spec/name]
                                      :req-un [:keys-spec/age])
                              (constantly true)))

will give the desired result.

I actually had to move the s/ands in my project up one level so that they wrap the keywords, similar to what you did, and that was my workaround for this issue.

from expound.

vemv avatar vemv commented on August 24, 2024

Hi @kelvinqian00! Likely it would be useful to have a bug repro following your new insight, WDYT?

Cheers - V

from expound.

bhb avatar bhb commented on August 24, 2024

@kelvinqian00 Thanks for reporting this! This is fixed in 78be800

from expound.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.