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
Copy file name to clipboardExpand all lines: README.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ This repo contains all the code examples in [Programming Scala, Third Edition](h
34
34
35
35
The `master` branch and the `3.X.Y` tag releases are for the third edition. The code examples for the second edition are still available. [Download the release tagged 2.1.0](https://github.com/deanwampler/programming-scala-book-code-examples/releases/tag/2.1.0) or check out the `release-2.1.0` branch. While the second edition was published for 2.11. The latest `2.1.0` release and `release-2.1.0` are updated for 2.12 and 2.13. (No more `release-2.X.Y` releases are planned.)
36
36
37
+
> **TIP:** Several sections offer troubleshooting tips if you encounter problems.
38
+
37
39
## How the Code Is Used in the Book
38
40
39
41
In the book's text, when an example corresponds to a file in this distribution, the listing begins with a path in a comment with the following format:
@@ -104,7 +106,7 @@ For other IDEs and text editors, try [Scala Metals](https://scalameta.org/metals
104
106
105
107
After installing the required plugins, load this project in your IDE, which should detect and use the `sbt` project automatically. For eclipse, run the `sbt eclipse` task to generate project files, then import them.
106
108
107
-
### Issues with IntelliJ
109
+
### Troubleshooting with IntelliJ
108
110
109
111
One reader reported a problem when trying to run examples in IntelliJ: `scalac: Flag -encoding set repeatedly`. I could confirm this problem and I fixed it as follows:
110
112
@@ -167,6 +169,28 @@ HELLO WORLD!
167
169
$
168
170
```
169
171
172
+
### Build Troubleshooting
173
+
174
+
Here are tips for issues users have reported.
175
+
176
+
#### Internationalization
177
+
178
+
I didn't check that the tests pass or the scripts work if your language environment isn't English. So, no surprise I guess, a German user reported that three tests failed when running `sbt test` while the `LANG` was set to `de_DE.UTF-8`:
179
+
180
+
```
181
+
[info] Passed: Total 7, Failed 0, Errors 0, Passed 7
182
+
[error] Failed: Total 233, Failed 7, Errors 0, Passed 226
[error] Total time: 2 s, completed 31.07.2021, 16:56:39
189
+
```
190
+
191
+
192
+
Setting `export LANG="en_US.UTF-8"; sbt test` works. A PR for this is welcome ;) As an interim step, you could wrap this logic (or the more concise single command `LANG="en_US.UTF-8" sbt test`) in a script or just ignore the three failing tests.
193
+
170
194
## Feedback
171
195
172
196
I welcome feedback on the Book and these examples. Please post comments, corrections, etc. to one of the following places:
0 commit comments