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

Pre-validate config #219

Open
plexus opened this issue Apr 14, 2021 · 1 comment
Open

Pre-validate config #219

plexus opened this issue Apr 14, 2021 · 1 comment
Labels
ergonomics Making Kaocha delightful to work with and people more efficient onboarding Make Kaocha easier for people or projects new to it

Comments

@plexus
Copy link
Member

plexus commented Apr 14, 2021

Certain configuration mistakes still cause rather unhelpful error messages, because we validate the config after normalizing it, so errors during normalization aren't cleanly handled.

Case in point, I just accidentally did this

#kaocha/v1
{:tests {:id :cljs
         :type :kaocha.type/cljs}}

Which should have been

#kaocha/v1
{:tests [{:id :cljs :type :kaocha.type/cljs}]}

Which gave me this error

Execution error (IllegalArgumentException) at meta-merge.core/meta-merge (core.cljc:100).
Don't know how to create ISeq from: clojure.lang.Keyword

Full report at:
/tmp/clojure-7895642946752562024.edn

This one's a bit annoying because we do have specs for config maps, but they only apply after normalization, adding defaults, renaming non-qualified keys etc. We'll need seperate specs (or a different validation strategy) if we want to validate the raw tests.edn.

@alysbrooks alysbrooks added ergonomics Making Kaocha delightful to work with and people more efficient onboarding Make Kaocha easier for people or projects new to it labels Aug 12, 2021
@alysbrooks
Copy link
Member

I think validation is important enough that we want to keep this feature idea open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ergonomics Making Kaocha delightful to work with and people more efficient onboarding Make Kaocha easier for people or projects new to it
Projects
Status: Candidate
Development

No branches or pull requests

2 participants