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

st/strip-extra-keys-transformer not handling merged s/or #271 #272

Closed
wants to merge 4 commits into from

Conversation

kolstae
Copy link

@kolstae kolstae commented Mar 29, 2023

Fix for #271

When merging an s/or with a s/keys this solution merges the s/keys into every s/or e.g.

(s/merge (s/or :a (s/keys :req-un [::a])
               :b (s/keys :req-un [::b]))
         (s/keys :req-un [::c]))

becomes

(s/or :a (s/keys :req-un [::a ::c])
      :b (s/keys :req-un [::b ::c]))

Note Without the change in src/spec_tools/core.cljc the sub-spec of the s/or got re-parsed missing the extra info stuffed in there from the merge. This is a nasty and perhaps brittle solution, but I was unable to come up with a better one without more changes

@codecov-commenter
Copy link

Codecov Report

Merging #272 (38a1912) into master (d15ec93) will decrease coverage by 0.02%.
The diff coverage is 88.23%.

@@            Coverage Diff             @@
##           master     #272      +/-   ##
==========================================
- Coverage   88.01%   87.99%   -0.02%     
==========================================
  Files          16       16              
  Lines        2052     2058       +6     
  Branches      183      183              
==========================================
+ Hits         1806     1811       +5     
- Misses         63       64       +1     
  Partials      183      183              
Impacted Files Coverage Δ
src/spec_tools/parse.cljc 96.20% <84.61%> (-0.53%) ⬇️
src/spec_tools/core.cljc 94.44% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kolstae
Copy link
Author

kolstae commented Jun 15, 2023

That last commit was just to see if it would work.
Is there anything I can do to help this PR along?

@kolstae
Copy link
Author

kolstae commented Jul 11, 2023

This solution is not sufficient to solve the problem - closing

@kolstae kolstae closed this Jul 11, 2023
@kolstae kolstae deleted the coll-of-merge-w-or branch July 11, 2023 10:16
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.

None yet

2 participants