fix(transaction): CLJS type error when purging history - #870
Open
harismh wants to merge 3 commits into
Open
Conversation
Expanded tests showed a :db.history.purge/before used a JVM only Date method, breaking queries on Node. Moved to shared helper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
While expanding CLJS test coverage, I found one bug where Java dates were used in CLJC call paths during
:db.history.purge/beforeops. Fix was a simple migration to a date shared utility.Checks
Bugfix
ADDITIONAL INFORMATION
I previously found this while trying to import every CLJC namespace in the
test.cljcfile like so: harismh@752e560Favored a slimmer PR instead, but LMK if I should I continue in that direction for the rest of the test coverage. I find the number of reader conditionals used helpful in highlighting CLJ/CLJS parity.
Side note: Wonder if a clj-kondo hook for this kind of error could be feasible? e.g. Lint alert if you use some var from common JS or Java namespaces without a reader conditional in a .cljc file.