-
Notifications
You must be signed in to change notification settings - Fork 3
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
[WIP] production modes #97
base: main
Are you sure you want to change the base?
Conversation
@@ -1,3 +1,5 @@ | |||
verify: `:pre`s preserved after refactor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
@@ -109,6 +109,78 @@ | |||
args-with-proper-tag-hints (ensure-proper-type-hints clj? args)] | |||
(apply list args-with-proper-tag-hints prepost body)))))) | |||
|
|||
(defn add-checking-form [tails ret-spec clj?] ;; deserves a test now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cover with tests
Particularly, for :pre / :post preservation (while we're there: fix #90)
:clj? clj?}) | ||
(let [analysis-result (process-name-and-tails {:tail (list [left]) | ||
:name nil | ||
:checking? false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to true
, stop parsing prepost, discard defn add-prepost
, ensure sensible checking
clauses are emitted for let
(are [x] (-> x meta :arglists first second meta :tag #?(:clj #{'Boolean `Boolean} | ||
:cljs #{'js/Boolean})) | ||
|
||
(are [x] (testing x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also improve rest of are
forms
args-check-form? (-> args-check-form count pos?) | ||
;; XXX analyze symbols (specs), replace keys (?) | ||
checking-form (when (or args-check-form?) | ||
(cond-> [`checking {}] ;; XXX options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"production mode" options must be implemented
(apply concat) | ||
(vec)) | ||
args-check-form? (-> args-check-form count pos?) | ||
;; XXX analyze symbols (specs), replace keys (?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this comment refers to the utils.spec checking possible API, and its possible differences to s.def's metadata API)
@@ -3,6 +3,7 @@ | |||
(:require | |||
#?(:clj [clojure.spec.alpha :as spec] :cljs [cljs.spec.alpha :as spec]) | |||
[clojure.walk :as walk] | |||
[nedap.speced.def.impl.analysis :refer [process-name-and-tails]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defprotocol lacks macroexpansion coverage
Brief
Part of #70
QA plan
Author checklist
Reviewer checklist