Skip to content

Commit e572355

Browse files
docs: update documentation for 2.0 release
1 parent 36b7d54 commit e572355

22 files changed

Lines changed: 175 additions & 459 deletions

chimney/src/main/scala-2/io/scalaland/chimney/dsl/package.scala

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ package object dsl {
3030
implicit def TransformationMapPathOps[M[_, _], K, V](a: M[K, V]): syntax.TransformationMapPathOps[M, K, V] =
3131
syntax.TransformationMapPathOps(a)
3232

33-
// Extension methods in dsl.* summon TypeClass.AutoDerived while extension methods in syntax.* summon TypeClass.
34-
// This help us preserve legacy behavior in dsl code while keeping stricter separation in auto/syntax imports.
33+
// dsl.* combines inlined and summoning extensions; syntax.* provides summoning extensions only.
3534

3635
/** Provides transformer operations on values of any type.
3736
*
@@ -50,7 +49,7 @@ package object dsl {
5049
* method.
5150
*
5251
* @see
53-
* [[io.scalaland.chimney.Transformer.AutoDerived#deriveAutomatic]] for default implicit instance
52+
* [[io.scalaland.chimney.Transformer#derive]] for default implicit instance
5453
*
5554
* @tparam To
5655
* target type
@@ -82,12 +81,12 @@ package object dsl {
8281
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
8382
*
8483
* @see
85-
* [[io.scalaland.chimney.PartialTransformer.AutoDerived#deriveAutomatic]] for default implicit instance
84+
* [[io.scalaland.chimney.PartialTransformer#derive]] for default implicit instance
8685
*
8786
* @tparam To
8887
* result target type of partial transformation
8988
* @param transformer
90-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
89+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
9190
* @return
9291
* partial transformation result value of target type `To`
9392
*
@@ -104,14 +103,14 @@ package object dsl {
104103
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
105104
*
106105
* @see
107-
* [[io.scalaland.chimney.PartialTransformer.AutoDerived#deriveAutomatic]] for default implicit instance
106+
* [[io.scalaland.chimney.PartialTransformer#derive]] for default implicit instance
108107
*
109108
* @tparam To
110109
* result target type of partial transformation
111110
* @param failFast
112111
* should fail as early as the first set of errors appear
113112
* @param transformer
114-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
113+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
115114
* @return
116115
* partial transformation result value of target type `To`
117116
*
@@ -140,7 +139,7 @@ package object dsl {
140139
* method.
141140
*
142141
* @see
143-
* [[io.scalaland.chimney.Patcher.AutoDerived#deriveAutomatic]] for default implicit instance
142+
* [[io.scalaland.chimney.Patcher#derive]] for default implicit instance
144143
*
145144
* @tparam Patch
146145
* type of patch object

chimney/src/main/scala-2/io/scalaland/chimney/syntax/package.scala

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ import scala.annotation.{compileTimeOnly, unused}
1010
*/
1111
package object syntax {
1212

13-
// Extension methods in dsl.* summon TypeClass.AutoDerived while extension methods in syntax.* summon TypeClass.
14-
// This help us preserve legacy behavior in dsl code while keeping stricter separation in auto/syntax imports.
15-
1613
/** Provides transformer operations on values of any type.
1714
*
1815
* @tparam From
@@ -30,7 +27,7 @@ package object syntax {
3027
* method.
3128
*
3229
* @see
33-
* [[io.scalaland.chimney.auto#deriveAutomaticTransformer]] for default implicit instance
30+
* [[io.scalaland.chimney.Transformer#derive]] for deriving an implicit instance
3431
*
3532
* @tparam To
3633
* target type
@@ -62,12 +59,12 @@ package object syntax {
6259
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
6360
*
6461
* @see
65-
* [[io.scalaland.chimney.auto#deriveAutomaticPartialTransformer]] for default implicit instance
62+
* [[io.scalaland.chimney.PartialTransformer#derive]] for deriving an implicit instance
6663
*
6764
* @tparam To
6865
* result target type of partial transformation
6966
* @param transformer
70-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
67+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
7168
* @return
7269
* partial transformation result value of target type `To`
7370
*
@@ -84,14 +81,14 @@ package object syntax {
8481
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
8582
*
8683
* @see
87-
* [[io.scalaland.chimney.auto#deriveAutomaticPartialTransformer]] for default implicit instance
84+
* [[io.scalaland.chimney.PartialTransformer#derive]] for deriving an implicit instance
8885
*
8986
* @tparam To
9087
* result target type of partial transformation
9188
* @param failFast
9289
* should fail as early as the first set of errors appear
9390
* @param transformer
94-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
91+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
9592
* @return
9693
* partial transformation result value of target type `To`
9794
*
@@ -120,7 +117,7 @@ package object syntax {
120117
* method.
121118
*
122119
* @see
123-
* [[io.scalaland.chimney.auto#deriveAutomaticPatcher]] for default implicit instance
120+
* [[io.scalaland.chimney.Patcher#derive]] for deriving an implicit instance
124121
*
125122
* @tparam Patch
126123
* type of patch object

chimney/src/main/scala-3/io/scalaland/chimney/dsl/dsl.scala

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export io.scalaland.chimney.syntax.{
1414
matchingSome
1515
}
1616

17-
// Extension methods in dsl.* summon TypeClass.AutoDerived while extension methods in syntax.* summon TypeClass.
18-
// This helps us preserve legacy behavior in dsl code while keeping stricter separation in auto/syntax imports.
17+
// dsl.* combines inlined and summoning extensions; syntax.* provides summoning extensions only.
1918

2019
/** Provides transformer operations on values of any type.
2120
*
@@ -30,8 +29,7 @@ extension [From](source: From) {
3029

3130
/** Performs in-place transformation of captured source value to target type.
3231
*
33-
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.dsl.TransformerOps#into]]
34-
* method.
32+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.into]] method.
3533
*
3634
* @see
3735
* [[io.scalaland.chimney.Transformer#derive]] for default implicit instance
@@ -62,16 +60,15 @@ extension [From](source: From) {
6260

6361
/** Performs in-place partial transformation of captured source value to target type.
6462
*
65-
* If you want to customize transformer behavior, consider using
66-
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
63+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.intoPartial]] method.
6764
*
6865
* @see
6966
* [[io.scalaland.chimney.PartialTransformer#derive]] for default implicit instance
7067
*
7168
* @tparam To
7269
* result target type of partial transformation
7370
* @param transformer
74-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
71+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
7572
* @return
7673
* partial transformation result value of target type `To`
7774
*
@@ -84,8 +81,7 @@ extension [From](source: From) {
8481

8582
/** Performs in-place partial transformation of captured source value to target type.
8683
*
87-
* If you want to customize transformer behavior, consider using
88-
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
84+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.intoPartial]] method.
8985
*
9086
* @see
9187
* [[io.scalaland.chimney.PartialTransformer#derive]] for default implicit instance
@@ -95,7 +91,7 @@ extension [From](source: From) {
9591
* @param failFast
9692
* should fail as early as the first set of errors appear
9793
* @param transformer
98-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
94+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
9995
* @return
10096
* partial transformation result value of target type `To`
10197
*
@@ -111,7 +107,7 @@ extension [From](source: From) {
111107
*
112108
* @param obj
113109
* wrapped object to patch
114-
* @tparam T
110+
* @tparam A
115111
* type of object to patch
116112
*
117113
* @since 0.1.3
@@ -120,8 +116,7 @@ extension [A](obj: A) {
120116

121117
/** Performs in-place patching of wrapped object with provided value.
122118
*
123-
* If you want to customize patching behavior, consider using [[io.scalaland.chimney.dsl.PatcherOps#using using]]
124-
* method.
119+
* If you want to customize patching behavior, consider using [[io.scalaland.chimney.inlined.using]] method.
125120
*
126121
* @see
127122
* [[io.scalaland.chimney.Patcher#derive]] for default implicit instance

chimney/src/main/scala-3/io/scalaland/chimney/inlined/inlined.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ extension [From](source: From) {
5959
*
6060
* @param obj
6161
* wrapped object to patch
62-
* @tparam T
62+
* @tparam A
6363
* type of object to patch
6464
*
6565
* @since 0.1.3

chimney/src/main/scala-3/io/scalaland/chimney/syntax/syntax.scala

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import io.scalaland.chimney.internal.runtime.{ChimneySelector, IsCollection, IsE
55

66
import scala.annotation.unused
77

8-
// Extension methods in dsl.* summon TypeClass.AutoDerived while extension methods in syntax.* summon TypeClass.
9-
// This help us preserve legacy behavior in dsl code while keeping stricter separation in auto/syntax imports.
10-
118
/** Provides transformer operations on values of any type.
129
*
1310
* @tparam From
@@ -21,11 +18,10 @@ extension [From](source: From) {
2118

2219
/** Performs in-place transformation of captured source value to target type.
2320
*
24-
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.dsl.TransformerOps#into]]
25-
* method.
21+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.into]] method.
2622
*
2723
* @see
28-
* [[io.scalaland.chimney.auto#deriveAutomaticTransformer]] for default implicit instance
24+
* [[io.scalaland.chimney.Transformer#derive]] for deriving an implicit instance
2925
*
3026
* @tparam To
3127
* target type
@@ -52,16 +48,15 @@ extension [From](source: From) {
5248

5349
/** Performs in-place partial transformation of captured source value to target type.
5450
*
55-
* If you want to customize transformer behavior, consider using
56-
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
51+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.intoPartial]] method.
5752
*
5853
* @see
59-
* [[io.scalaland.chimney.auto#deriveAutomaticPartialTransformer]] for default implicit instance
54+
* [[io.scalaland.chimney.PartialTransformer#derive]] for deriving an implicit instance
6055
*
6156
* @tparam To
6257
* result target type of partial transformation
6358
* @param transformer
64-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
59+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
6560
* @return
6661
* partial transformation result value of target type `To`
6762
*
@@ -74,18 +69,17 @@ extension [From](source: From) {
7469

7570
/** Performs in-place partial transformation of captured source value to target type.
7671
*
77-
* If you want to customize transformer behavior, consider using
78-
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
72+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.intoPartial]] method.
7973
*
8074
* @see
81-
* [[io.scalaland.chimney.auto#deriveAutomaticPartialTransformer]] for default implicit instance
75+
* [[io.scalaland.chimney.PartialTransformer#derive]] for deriving an implicit instance
8276
*
8377
* @tparam To
8478
* result target type of partial transformation
8579
* @param failFast
8680
* should fail as early as the first set of errors appear
8781
* @param transformer
88-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
82+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
8983
* @return
9084
* partial transformation result value of target type `To`
9185
*
@@ -110,11 +104,10 @@ extension [A](obj: A) {
110104

111105
/** Performs in-place patching of wrapped object with provided value.
112106
*
113-
* If you want to customize patching behavior, consider using [[io.scalaland.chimney.dsl.PatcherOps#using using]]
114-
* method.
107+
* If you want to customize patching behavior, consider using [[io.scalaland.chimney.inlined.using]] method.
115108
*
116109
* @see
117-
* [[io.scalaland.chimney.auto#deriveAutomaticPatcher]] for default implicit instance
110+
* [[io.scalaland.chimney.Patcher#derive]] for deriving an implicit instance
118111
*
119112
* @tparam Patch
120113
* type of patch object

chimney/src/main/scala/io/scalaland/chimney/AllowDerivation.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package io.scalaland.chimney
99
* A no-op under the default `always-allowed` policy.
1010
*
1111
* @see
12-
* [[https://chimney.readthedocs.io Chimney documentation - derivation policy chapter]]
12+
* [[https://chimney.readthedocs.io/cookbook/#derivation-policy-restricting-where-derivation-may-happen Chimney documentation - derivation policy chapter]]
1313
*
1414
* @since 2.0.0
1515
*/

chimney/src/main/scala/io/scalaland/chimney/LogDerivation.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package io.scalaland.chimney
77
* `debug._` imports.
88
*
99
* @see
10-
* [[https://chimney.readthedocs.io Chimney documentation - debugging chapter]]
10+
* [[https://chimney.readthedocs.io/troubleshooting/#debug-logging-without-touching-the-code-import-or-scalac-option Chimney documentation - debugging chapter]]
1111
*
1212
* @since 2.0.0
1313
*/

chimney/src/main/scala/io/scalaland/chimney/PartialTransformer.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ object PartialTransformer extends PartialTransformerLowPriorityImplicits1 {
245245
def define[From, To]: PartialTransformerDefinition[From, To, TransformerOverrides.Empty, TransformerFlags.Default] =
246246
new PartialTransformerDefinition(TransformerDefinitionCommons.emptyRuntimeDataStore)
247247

248-
/** Type class used when you want to allow using automatically derived transformations.
248+
/** Compatibility alias retained for source compatibility with Chimney 1.x.
249249
*
250-
* When we want to only allow semiautomatically derived/manually defined instances you should use
251-
* [[io.scalaland.chimney.PartialTransformer]].
250+
* Since Chimney 2.0.0 automatic and explicitly derived transformations use the same
251+
* [[io.scalaland.chimney.PartialTransformer]] type.
252252
*
253253
* @see
254254
* [[https://chimney.readthedocs.io/cookbook/#automatic-semiautomatic-and-inlined-derivation]] for more details

chimney/src/main/scala/io/scalaland/chimney/Patcher.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ object Patcher extends PatcherCompanionPlatform {
6565
def define[A, Patch]: PatcherDefinition[A, Patch, PatcherOverrides.Empty, PatcherFlags.Default] =
6666
new PatcherDefinition(PatcherDefinitionCommons.emptyRuntimeDataStore)
6767

68-
/** Type class used when you want to allow using automatically derived patchings.
68+
/** Compatibility alias retained for source compatibility with Chimney 1.x.
6969
*
70-
* When we want to only allow semiautomatically derived/manually defined instances you should use
71-
* [[io.scalaland.chimney.Patcher]].
70+
* Since Chimney 2.0.0 automatic and explicitly derived patchers use the same [[io.scalaland.chimney.Patcher]] type.
7271
*
7372
* @see
7473
* [[https://chimney.readthedocs.io/cookbook/#automatic-semiautomatic-and-inlined-derivation]] for more details

chimney/src/main/scala/io/scalaland/chimney/Transformer.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ object Transformer extends TransformerLowPriorityImplicits1 {
132132
: PartialTransformerDefinition[From, To, TransformerOverrides.Empty, TransformerFlags.Default] =
133133
new PartialTransformerDefinition(TransformerDefinitionCommons.emptyRuntimeDataStore)
134134

135-
/** Type class used when you want to allow using automatically derived transformations.
135+
/** Compatibility alias retained for source compatibility with Chimney 1.x.
136136
*
137-
* When we want to only allow semiautomatically derived/manually defined instances you should use
138-
* [[io.scalaland.chimney.Transformer]].
137+
* Since Chimney 2.0.0 automatic and explicitly derived transformations use the same
138+
* [[io.scalaland.chimney.Transformer]] type.
139139
*
140140
* @see
141141
* [[https://chimney.readthedocs.io/cookbook/#automatic-semiautomatic-and-inlined-derivation]] for more details

0 commit comments

Comments
 (0)