You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more advanced uses like incorporating diffs into your own Fipp documents, see `lambdaisland.deep-diff.printer/format-doc`, `lambdaisland.deep-diff.printer/print-doc`.
58
+
For more advanced uses like incorporating diffs into your own Fipp documents, see `lambdaisland.deep-diff2.printer/format-doc`, `lambdaisland.deep-diff2.printer/print-doc`.
53
59
54
60
You can register print handlers for new types using
55
-
`lambdaisland.deep-diff.printer/register-print-handler!`, or by passing and
61
+
`lambdaisland.deep-diff2.printer/register-print-handler!`, or by passing and
56
62
`:extra-handlers` map to `printer`.
57
63
64
+
### Deep-diff 1 vs 2
65
+
66
+
The original deep-diff only worked on Clojure, not ClojureScript. In porting the
67
+
code to CLJC we were forced to make some breaking changes. To not break existing
68
+
consumers we decided to move both the namespaces and the released artifact to
69
+
new names, so the old and new deep-diff can exist side by side.
70
+
71
+
When starting new projects you should use `lambdaisland/deep-diff2`. However if
72
+
you have existing code that uses `lambdaisland/deep-diff` and you don't need the
73
+
ClojureScript support then it is not necessary to upgrade. The old version still
74
+
works fine (on Clojure).
75
+
76
+
You can upgrade of course, simply by replacing all namespace names from
77
+
`lambdaisland.deep-diff` to `lambdaisland.deep-diff2`. If you are only using the
78
+
top-level API (`diff`, `printer`, `pretty-print`) and you aren't using custom
79
+
print handlers, then things should work exactly the same. If you find that
80
+
deep-diff 2 behaves differently then please file an issue, you may have found a
81
+
regression.
82
+
83
+
The old code still lives on the `deep-diff-1` branch, and we do accept bugfix
84
+
patches there, so we may put out bugfix releases of the original deep-diff in
85
+
the future. When in doubt check the CHANGELOG.
86
+
87
+
<!-- contributing -->
88
+
### Contributing
89
+
90
+
Everyone has a right to submit patches to this projects, and thus become a contributor.
91
+
92
+
Contributors MUST
93
+
94
+
- adhere to the [LambdaIsland Clojure Style Guide](https://nextjournal.com/lambdaisland/clojure-style-guide)
95
+
- write patches that solve a problem. Start by stating the problem, then supply a minimal solution. `*`
96
+
- agree to license their contributions as MPLv2.
97
+
- not break the contract with downstream consumers. `**`
98
+
- not break the tests.
99
+
100
+
Contributors SHOULD
101
+
102
+
- update the CHANGELOG and README.
103
+
- add tests for new functionality.
104
+
105
+
If you submit a pull request that adheres to these rules, then it will almost
106
+
certainly be merged immediately. However some things may require more
107
+
consideration. If you add new dependencies, or significantly increase the API
108
+
surface, then we need to decide if these changes are in line with the project's
109
+
goals. In this case you can start by [writing a
110
+
pitch](https://nextjournal.com/lambdaisland/pitch-template), and collecting
111
+
feedback on it.
112
+
113
+
`*` This goes for features too, a feature needs to solve a problem. State the problem it solves, then supply a minimal solution.
114
+
115
+
`**` As long as this project has not seen a public release (i.e. is not on Clojars)
116
+
we may still consider making breaking changes, if there is consensus that the
117
+
changes are justified.
118
+
<!-- /contributing -->
119
+
58
120
## Credits
59
121
60
122
This library builds upon
@@ -74,6 +136,6 @@ Another library that implements a form of data structure diffing is [editscript]
0 commit comments