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
"-Yrequire-targetName", // Warn if an operator is defined without a @targetName annotation
111
-
// "-Yexplicit-nulls", // Make reference types non-nullable. Nullable types can be expressed with unions: e.g. String|Null.
112
-
113
-
// I am unsure if this is required for proper tooling to work. Metals/IntelliJ may already cover this.
114
-
"-Xsemanticdb", // Store information in SemanticDB
86
+
"-feature",
87
+
"-Wunused:all",
115
88
]
116
89
}
117
90
118
91
compileJava {
119
-
options.encoding = 'UTF-8'
120
-
options.compilerArgs << '-parameters'
92
+
options.encoding = "UTF-8"
93
+
options.compilerArgs << "-parameters"
121
94
}
122
95
123
96
compileTestJava {
124
-
options.encoding = 'UTF-8'
97
+
options.encoding = "UTF-8"
125
98
}
126
99
```
127
100
@@ -131,43 +104,40 @@ If you want to use this extension, you need to add the `io.quarkiverse.scala:qua
131
104
In your `pom.xml` file, add:
132
105
133
106
```xml
134
-
<dependency>
135
-
<groupId>io.quarkiverse.scala</groupId>
136
-
<artifactId>quarkus-scala3</artifactId>
137
-
<version>0.0.1<version>
138
-
</dependency>
107
+
<dependencies>
108
+
...
109
+
<dependency>
110
+
<groupId>io.quarkiverse.scala</groupId>
111
+
<artifactId>quarkus-scala3</artifactId>
112
+
<version>0.0.1<version>
113
+
</dependency>
114
+
...
139
115
```
140
116
141
-
Then, you will need to install the Scala 3 compiler, the Scala Maven plugin, and to fix an odd bug with the way that the Scala 3 compiler Maven dependencies are resolved.
142
-
143
-
Due to Scala 2 version in upstream `Quarkus BOM`, the wrong version of `scala-library` (a transitive dependency: `scala3-compiler_3` -> `scala3-library_3` -> `scala-library`) is resolved.
144
-
145
-
This causes binary incompatibilities -- and Scala to break. In order to fix this, you just need to manually align the version of `scala-library` to the one listed as used by the version of `scala3-library_3` that's the same as the `scala3-compiler_3` version.
146
-
147
-
So for `scala3-compiler_3` = `3.0.0`, then `scala3-library_3` = `3.0.0`, and we check the `scala-library` version it uses:
<!-- Version manually aligned to scala3-library_3:3.0.0 dependency -->
168
-
<groupId>org.scala-lang</groupId>
169
-
<artifactId>scala-library</artifactId>
170
-
<version>${scala-library.version}</version>
138
+
<groupId>org.scala-lang</groupId>
139
+
<artifactId>scala3-compiler_3</artifactId>
140
+
<version>${scala.version}</version>
171
141
</dependency>
172
142
</dependencies>
173
143
@@ -203,10 +173,10 @@ Here, we can see that it was compiled with `2.13.5` in it's dependencies. So tha
203
173
<scalaVersion>${scala.version}</scalaVersion>
204
174
<!-- Some solid defaults, change if you like -->
205
175
<args>
206
-
<arg>-deprecated</arg>
207
-
<arg>-explain</arg>
176
+
<arg>-Wunused:all</arg>
208
177
<arg>-feature</arg>
209
-
<arg>-Ysafe-init</arg>
178
+
<arg>-deprecation</arg>
179
+
<arg>-Ysemanticdb</arg>
210
180
</args>
211
181
</configuration>
212
182
</plugin>
@@ -253,28 +223,17 @@ class MyTest:
253
223
254
224
### Scala and Jackson serialization for JSON with Scala Enum support
255
225
256
-
If using Jackson for serialization, you probably want JSON support for case class and Enum.
257
-
There are two libraries you need to add to your project to enable this:
258
-
259
-
1. The standard Jackson Scala module
260
-
2. An addon module from one of the Jackson Scala maintainers for Scala 3 enums that hasn't made its way into the official module yet
226
+
If using Jackson for serialization, you probably want JSON support for case class and Enum. Scala Jackson module already supports Scala 3 Enums built-in.
261
227
262
228
To set this up:
263
229
264
-
- Add the following to your dependencies
230
+
- Add the following to your dependencies (in addition to existing `quarkus-jackson` and `quarkus-rest-jackson` extensions).
0 commit comments