Skip to content

Commit e3e358e

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

22 files changed

Lines changed: 181 additions & 457 deletions

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ 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+
// Keep the legacy dsl.* signatures using the AutoDerived compatibility aliases; syntax.* uses the type classes
34+
// directly.
3535

3636
/** Provides transformer operations on values of any type.
3737
*
@@ -50,7 +50,7 @@ package object dsl {
5050
* method.
5151
*
5252
* @see
53-
* [[io.scalaland.chimney.Transformer.AutoDerived#deriveAutomatic]] for default implicit instance
53+
* [[io.scalaland.chimney.Transformer#derive]] for default implicit instance
5454
*
5555
* @tparam To
5656
* target type
@@ -82,12 +82,12 @@ package object dsl {
8282
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
8383
*
8484
* @see
85-
* [[io.scalaland.chimney.PartialTransformer.AutoDerived#deriveAutomatic]] for default implicit instance
85+
* [[io.scalaland.chimney.PartialTransformer#derive]] for default implicit instance
8686
*
8787
* @tparam To
8888
* result target type of partial transformation
8989
* @param transformer
90-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
90+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
9191
* @return
9292
* partial transformation result value of target type `To`
9393
*
@@ -104,14 +104,14 @@ package object dsl {
104104
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
105105
*
106106
* @see
107-
* [[io.scalaland.chimney.PartialTransformer.AutoDerived#deriveAutomatic]] for default implicit instance
107+
* [[io.scalaland.chimney.PartialTransformer#derive]] for default implicit instance
108108
*
109109
* @tparam To
110110
* result target type of partial transformation
111111
* @param failFast
112112
* should fail as early as the first set of errors appear
113113
* @param transformer
114-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
114+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
115115
* @return
116116
* partial transformation result value of target type `To`
117117
*
@@ -140,7 +140,7 @@ package object dsl {
140140
* method.
141141
*
142142
* @see
143-
* [[io.scalaland.chimney.Patcher.AutoDerived#deriveAutomatic]] for default implicit instance
143+
* [[io.scalaland.chimney.Patcher#derive]] for default implicit instance
144144
*
145145
* @tparam Patch
146146
* type of patch object

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ 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.
13+
// Keep the legacy dsl.* signatures using the AutoDerived compatibility aliases; syntax.* uses the type classes
14+
// directly.
1515

1616
/** Provides transformer operations on values of any type.
1717
*
@@ -30,7 +30,7 @@ package object syntax {
3030
* method.
3131
*
3232
* @see
33-
* [[io.scalaland.chimney.auto#deriveAutomaticTransformer]] for default implicit instance
33+
* [[io.scalaland.chimney.Transformer#derive]] for deriving an implicit instance
3434
*
3535
* @tparam To
3636
* target type
@@ -62,12 +62,12 @@ package object syntax {
6262
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
6363
*
6464
* @see
65-
* [[io.scalaland.chimney.auto#deriveAutomaticPartialTransformer]] for default implicit instance
65+
* [[io.scalaland.chimney.PartialTransformer#derive]] for deriving an implicit instance
6666
*
6767
* @tparam To
6868
* result target type of partial transformation
6969
* @param transformer
70-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
70+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
7171
* @return
7272
* partial transformation result value of target type `To`
7373
*
@@ -84,14 +84,14 @@ package object syntax {
8484
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
8585
*
8686
* @see
87-
* [[io.scalaland.chimney.auto#deriveAutomaticPartialTransformer]] for default implicit instance
87+
* [[io.scalaland.chimney.PartialTransformer#derive]] for deriving an implicit instance
8888
*
8989
* @tparam To
9090
* result target type of partial transformation
9191
* @param failFast
9292
* should fail as early as the first set of errors appear
9393
* @param transformer
94-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
94+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
9595
* @return
9696
* partial transformation result value of target type `To`
9797
*
@@ -120,7 +120,7 @@ package object syntax {
120120
* method.
121121
*
122122
* @see
123-
* [[io.scalaland.chimney.auto#deriveAutomaticPatcher]] for default implicit instance
123+
* [[io.scalaland.chimney.Patcher#derive]] for deriving an implicit instance
124124
*
125125
* @tparam Patch
126126
* type of patch object

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

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ 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+
// Keep the legacy dsl.* signatures using the AutoDerived compatibility aliases; syntax.* uses the type classes
18+
// directly.
1919

2020
/** Provides transformer operations on values of any type.
2121
*
@@ -30,8 +30,7 @@ extension [From](source: From) {
3030

3131
/** Performs in-place transformation of captured source value to target type.
3232
*
33-
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.dsl.TransformerOps#into]]
34-
* method.
33+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.into]] method.
3534
*
3635
* @see
3736
* [[io.scalaland.chimney.Transformer#derive]] for default implicit instance
@@ -62,16 +61,15 @@ extension [From](source: From) {
6261

6362
/** Performs in-place partial transformation of captured source value to target type.
6463
*
65-
* If you want to customize transformer behavior, consider using
66-
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
64+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.intoPartial]] method.
6765
*
6866
* @see
6967
* [[io.scalaland.chimney.PartialTransformer#derive]] for default implicit instance
7068
*
7169
* @tparam To
7270
* result target type of partial transformation
7371
* @param transformer
74-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
72+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
7573
* @return
7674
* partial transformation result value of target type `To`
7775
*
@@ -84,8 +82,7 @@ extension [From](source: From) {
8482

8583
/** Performs in-place partial transformation of captured source value to target type.
8684
*
87-
* If you want to customize transformer behavior, consider using
88-
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
85+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.intoPartial]] method.
8986
*
9087
* @see
9188
* [[io.scalaland.chimney.PartialTransformer#derive]] for default implicit instance
@@ -95,7 +92,7 @@ extension [From](source: From) {
9592
* @param failFast
9693
* should fail as early as the first set of errors appear
9794
* @param transformer
98-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
95+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
9996
* @return
10097
* partial transformation result value of target type `To`
10198
*
@@ -111,7 +108,7 @@ extension [From](source: From) {
111108
*
112109
* @param obj
113110
* wrapped object to patch
114-
* @tparam T
111+
* @tparam A
115112
* type of object to patch
116113
*
117114
* @since 0.1.3
@@ -120,8 +117,7 @@ extension [A](obj: A) {
120117

121118
/** Performs in-place patching of wrapped object with provided value.
122119
*
123-
* If you want to customize patching behavior, consider using [[io.scalaland.chimney.dsl.PatcherOps#using using]]
124-
* method.
120+
* If you want to customize patching behavior, consider using [[io.scalaland.chimney.inlined.using]] method.
125121
*
126122
* @see
127123
* [[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: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ 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.
8+
// Keep the legacy dsl.* signatures using the AutoDerived compatibility aliases; syntax.* uses the type classes
9+
// directly.
1010

1111
/** Provides transformer operations on values of any type.
1212
*
@@ -21,11 +21,10 @@ extension [From](source: From) {
2121

2222
/** Performs in-place transformation of captured source value to target type.
2323
*
24-
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.dsl.TransformerOps#into]]
25-
* method.
24+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.into]] method.
2625
*
2726
* @see
28-
* [[io.scalaland.chimney.auto#deriveAutomaticTransformer]] for default implicit instance
27+
* [[io.scalaland.chimney.Transformer#derive]] for deriving an implicit instance
2928
*
3029
* @tparam To
3130
* target type
@@ -52,16 +51,15 @@ extension [From](source: From) {
5251

5352
/** Performs in-place partial transformation of captured source value to target type.
5453
*
55-
* If you want to customize transformer behavior, consider using
56-
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
54+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.intoPartial]] method.
5755
*
5856
* @see
59-
* [[io.scalaland.chimney.auto#deriveAutomaticPartialTransformer]] for default implicit instance
57+
* [[io.scalaland.chimney.PartialTransformer#derive]] for deriving an implicit instance
6058
*
6159
* @tparam To
6260
* result target type of partial transformation
6361
* @param transformer
64-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
62+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
6563
* @return
6664
* partial transformation result value of target type `To`
6765
*
@@ -74,18 +72,17 @@ extension [From](source: From) {
7472

7573
/** Performs in-place partial transformation of captured source value to target type.
7674
*
77-
* If you want to customize transformer behavior, consider using
78-
* [[io.scalaland.chimney.dsl.PartialTransformerOps#intoPartial]] method.
75+
* If you want to customize transformer behavior, consider using [[io.scalaland.chimney.inlined.intoPartial]] method.
7976
*
8077
* @see
81-
* [[io.scalaland.chimney.auto#deriveAutomaticPartialTransformer]] for default implicit instance
78+
* [[io.scalaland.chimney.PartialTransformer#derive]] for deriving an implicit instance
8279
*
8380
* @tparam To
8481
* result target type of partial transformation
8582
* @param failFast
8683
* should fail as early as the first set of errors appear
8784
* @param transformer
88-
* implicit instance of [[io.scalaland.chimney.Transformer]] type class
85+
* implicit instance of [[io.scalaland.chimney.PartialTransformer]] type class
8986
* @return
9087
* partial transformation result value of target type `To`
9188
*
@@ -110,11 +107,10 @@ extension [A](obj: A) {
110107

111108
/** Performs in-place patching of wrapped object with provided value.
112109
*
113-
* If you want to customize patching behavior, consider using [[io.scalaland.chimney.dsl.PatcherOps#using using]]
114-
* method.
110+
* If you want to customize patching behavior, consider using [[io.scalaland.chimney.inlined.using]] method.
115111
*
116112
* @see
117-
* [[io.scalaland.chimney.auto#deriveAutomaticPatcher]] for default implicit instance
113+
* [[io.scalaland.chimney.Patcher#derive]] for deriving an implicit instance
118114
*
119115
* @tparam Patch
120116
* 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)