Skip to content

Commit ab47515

Browse files
authored
Merge branch 'scala:main' into _overview/scala3-book/num12-code-tabs
2 parents 7404d59 + 3af877c commit ab47515

26 files changed

+1592
-420
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ keywords:
1515
- Document
1616
- Guide
1717

18-
scala-version: 2.13.9
18+
scala-version: 2.13.10
1919
scala-212-version: 2.12.17
2020
scala-3-version: 3.2.0
2121

_overviews/FAQ/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Welcome to Scala 3.2.0 (17.0.3, Java OpenJDK 64-Bit Server VM).
119119
Type in expressions for evaluation. Or try :help.
120120
121121
scala> util.Properties.versionNumberString
122-
val res0: String = 2.13.9
122+
val res0: String = 2.13.10
123123
```
124124

125125
Note that Scala 3 offers

_overviews/collections-2.13/trait-iterable.md

Lines changed: 86 additions & 87 deletions
Large diffs are not rendered by default.

_overviews/contribute/add-guides.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ can generate the same tabs in markdown with the `tabs` directive and class `tabs
111111
~~~liquid
112112
{% tabs hello-world-demo class=tabs-scala-version %}
113113
114-
{% tab 'Scala 2' for=hello-world-demo %}
114+
{% tab 'Scala 2' %}
115115
```scala
116116
object hello extends App {
117117
println("Hello, World!")
118118
}
119119
```
120120
{% endtab %}
121121
122-
{% tab 'Scala 3' for=hello-world-demo %}
122+
{% tab 'Scala 3' %}
123123
```scala
124124
@main def hello() = println("Hello, World!")
125125
```
@@ -134,12 +134,12 @@ It is crucial that you use the `tabs-scala-version` class to benefit from some c
134134
- the tab picked will be remembered across the site, and when the user returns to the page after some time.
135135

136136
For code snippets that are valid in both Scala 2 and Scala 3, please use a single tab labelled
137-
Scala 2 and 3 (please note that the `tabs-scala-version` class is also dropped):
137+
`'Scala 2 and 3'` (please note that the `tabs-scala-version` class is also dropped):
138138

139139
<!-- {% raw %} -->
140140
~~~liquid
141141
{% tabs scala-2-and-3-demo %}
142-
{% tab 'Scala 2 and 3' for=scala-2-and-3-demo %}
142+
{% tab 'Scala 2 and 3' %}
143143
```scala
144144
List(1, 2, 3).map(x => x + 1).sum
145145
```
@@ -148,6 +148,19 @@ List(1, 2, 3).map(x => x + 1).sum
148148
~~~
149149
<!-- {% endraw %} -->
150150

151+
For examples that only apply to either one of Scala 2 or 3, use the tabs `'Scala 2 Only'` and `'Scala 3 Only'`.
152+
153+
If you have a particularly long tab, for readability you can indicate which tab group it belongs to with
154+
a parameter `for=tab-group` as in this example:
155+
<!-- {% raw %} -->
156+
~~~liquid
157+
{% tabs my-tab-group class=tabs-scala-version %}
158+
...
159+
{% tab 'Scala 3' for=my-tab-group %}
160+
...
161+
~~~
162+
<!-- {% endraw %} -->
163+
151164
### Typechecked Examples
152165

153166
The site build process uses [mdoc](https://scalameta.org/mdoc/) to typecheck

_overviews/contribute/bug-reporting-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ If you cannot find your issue in the issue tracker, create a new bug. The detail
6565

6666
Please make sure to fill in as many fields as possible. Make sure you've indicated the following:
6767

68-
1. **Exact Scala version** that you are using. For example, `2.13.9` or `3.2.0`. If the bug happens in multiple versions indicate all of them.
68+
1. **Exact Scala version** that you are using. For example, `2.13.10` or `3.2.0`. If the bug happens in multiple versions indicate all of them.
6969
2. **The component** that is affected by the bug. For example, the Standard Library, Scaladoc, etc.
7070
3. **Labels** related to your issue. For example, if you think your issue is related to the typechecker, and if you have successfully minimized your issue, label your bug as "typechecker" and "minimized". Issue tracker will suggest names for existing labels as you type them so try not to create duplicates.
7171
4. **Running environment**. Are you running on Linux? Windows? What JVM version are you using?

0 commit comments

Comments
 (0)