We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
(ddiff/diff {:a 1} {:a 1 :items [{:x 3}]}) => {#lambdaisland.deep_diff2.diff_impl.Insertion{:+ :items} [{:x 3}], :a 1} (->> (ddiff/diff {:a 1} {:a 1 :items [{:x 3}]}) (ddiff/minimize)) => {#lambdaisland.deep_diff2.diff_impl.Insertion{:+ :items} []}
So all such big differences are hidden.
The text was updated successfully, but these errors were encountered:
New tests below demonstrate it. Tests 1 and 3 with scalar value are passing now. Tests 2 and 4 are failing, because empty vector is returned:
(testing "adding new map keys with scalar value" (is (= (ddiff/minimize (ddiff/diff {:a 1} {:a 1 :b 2})) {(diff/->Insertion :b) 2}))) (testing "adding new map keys with collection" (is (= (ddiff/minimize (ddiff/diff {:a 1} {:a 1 :b [1 2]})) {(diff/->Insertion :b) [1 2]}))) (testing "removing map keys with scalar value" (is (= (ddiff/minimize (ddiff/diff {:a 1 :b 2} {:a 1})) {(diff/->Deletion :b) 2}))) (testing "removing map keys with collection" (is (= (ddiff/minimize (ddiff/diff {:a 1 :b [1 2]} {:a 1})) {(diff/->Deletion :b) [1 2]})))`
Sorry, something went wrong.
(testing "adding new map keys with nested collection" (is (= (ddiff/minimize (ddiff/diff {:a 1} {:a 1 :b [{:x 1} {:x 2}]})) {(diff/->Insertion :b) [{:x 1} {:x 2}]}))) (testing "removing map keys with nested collection" (is (= (ddiff/minimize (ddiff/diff {:a 1 :b [{:x 1} {:x 2}]} {:a 1})) {(diff/->Deletion :b) [{:x 1} {:x 2}]})))
I have created a different version of minimize which suits my needs. Postwalk is replaced by recursion to pass the above tests: https://github.com/kajism/deep-diff2/blob/main/src/lambdaisland/deep_diff2/minimize_impl.cljc
But is is not 100% backwards compatibile.
No branches or pull requests
So all such big differences are hidden.
The text was updated successfully, but these errors were encountered: