Skip to content

Commit

Permalink
Merge branch 'scala:main' into zh-cn/overviews/scala3-book/ca-context…
Browse files Browse the repository at this point in the history
…-parameters
  • Loading branch information
benluo authored Sep 15, 2023
2 parents f75d049 + 86c9d2f commit eba51b1
Show file tree
Hide file tree
Showing 224 changed files with 6,819 additions and 1,789 deletions.
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.4.3)
activesupport (7.0.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -13,7 +13,7 @@ GEM
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.23.9)
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
dnsruby (1.61.9)
simpleidn (~> 0.1)
Expand Down Expand Up @@ -95,7 +95,7 @@ GEM
yell (~> 2.0)
zeitwerk (~> 2.5)
http_parser.rb (0.8.0)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (3.9.3)
addressable (~> 2.4)
Expand Down Expand Up @@ -218,7 +218,7 @@ GEM
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.18.0)
minitest (5.19.0)
nokogiri (1.14.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.14.3-x64-mingw-ucrt)
Expand Down
4 changes: 2 additions & 2 deletions _ba/tour/implicit-conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Možete, zato što `Predef` uključuje slj. implicitnu konverziju:
```scala mdoc
import scala.language.implicitConversions

implicit def int2Integer(x: Int) =
java.lang.Integer.valueOf(x)
implicit def int2Integer(x: Int): Integer =
Integer.valueOf(x)
```

Pošto su implicitne konverzije opasne ako se koriste pogrešno, kompajler upozorava kada kompajlira definiciju implicitne konverzije.
Expand Down
2 changes: 1 addition & 1 deletion _cheatsheets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ breakable {
var y = x
val readonly = 5
private var secret = 1
def this = this(42)
def this() = this(42)
}</code></pre></td>
<td>Constructor is class body.<br />Declare a public member.<br />Declare a gettable but not settable member.<br />Declare a private member.<br />Alternative constructor.</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ keywords:
- Document
- Guide

scala-version: 2.13.10
scala-212-version: 2.12.17
scala-3-version: 3.2.2
scala-version: 2.13.12
scala-212-version: 2.12.18
scala-3-version: 3.3.1

collections:
style:
Expand Down
2 changes: 2 additions & 0 deletions _data/footer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
links:
- title: Community
url: "http://scala-lang.org/community/"
- title: Governance
url: "http://scala-lang.org/community/index.html#governance"
- title: Mailing Lists
url: "http://scala-lang.org/community/index.html#mailing-lists"
- title: Chat Rooms & More
Expand Down
5 changes: 3 additions & 2 deletions _includes/_markdown/install-munit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
{% tab 'Scala CLI' %}
You can require the entire toolkit in a single line:
```scala
//> using dep "org.scala-lang::toolkit-test:0.1.7"
//> using toolkit latest
```
MUnit, being a testing framework, is only available in test files: files in a `test` directory or ones that have the `.test.scala` extension. Refer to the [Scala CLI documentation](https://scala-cli.virtuslab.org/docs/commands/test/) to learn more about the test scope.

Alternatively, you can require just a specific version of MUnit:
```scala
//> using dep "org.scalameta::munit:1.0.0-M7"
//> using dep org.scalameta::munit:1.0.0-M7
```
{% endtab %}
{% tab 'sbt' %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/_markdown/install-os-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
{% tab 'Scala CLI' %}
You can require the entire toolkit in a single line:
```scala
//> using toolkit "latest"
//> using toolkit latest
```

Alternatively, you can require just a specific version of OS-Lib:
```scala
//> using dep "com.lihaoyi::os-lib:0.9.1"
//> using dep com.lihaoyi::os-lib:0.9.1
```
{% endtab %}
{% tab 'sbt' %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/_markdown/install-sttp.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
{% tab 'Scala CLI' %}
You can require the entire toolkit in a single line:
```scala
//> using toolkit "latest"
//> using toolkit latest
```

Alternatively, you can require just a specific version of sttp:
```scala
//> using dep "com.softwaremill.sttp.client4::core:4.0.0-M1"
//> using dep com.softwaremill.sttp.client4::core:4.0.0-M1
```
{% endtab %}
{% tab 'sbt' %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/_markdown/install-upickle.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
{% tab 'Scala CLI' %}
Using Scala CLI, you can require the entire toolkit in a single line:
```scala
//> using toolkit "latest"
//> using toolkit latest
```

Alternatively, you can require just a specific version of UPickle:
```scala
//> using dep "com.lihaoyi::upickle:3.1.0
//> using dep com.lihaoyi::upickle:3.1.0
```
{% endtab %}
{% tab 'sbt' %}
Expand Down
13 changes: 12 additions & 1 deletion _includes/inner-documentation-sections.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@

<div class="documentation">
{% for link in include.links %}

<!-- check if link starts with '#' -->
{% assign first_char = link.link | slice: 0 %}
{% if first_char == '#' %}
{% assign is_url = false %}
{% else %}
{% assign is_url = true %}
{% endif %}

<a href="{% if link.link contains '://' %}{{link.link}}{% else %}{{site.baseurl}}{{link.link}}{% endif %}"
class="doc-item doc-item-link">
class="doc-item doc-item-link"
{% if is_url %}target="_blank" rel="noopener noreferrer"{% endif %}
>
<div class="doc-item-header">
<i class="{{link.icon}}"></i>
<h4>{{link.title}}</h4>
Expand Down
30 changes: 22 additions & 8 deletions _includes/version-specific-notice.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,29 @@
<blockquote class="help-info">
<i class="fa fa-info"></i><span style="margin-left: 0.5rem">
{% if include.language == 'scala3' %}
This doc page is specific to Scala 3,
and may cover new concepts not available in Scala 2. Unless
otherwise stated, all the code examples in this page assume
you are using Scala 3.
{% if include.page-language == 'ru' %}
Эта страница документа относится к Scala 3 и
может охватывать новые концепции, недоступные в Scala 2.
Если не указано явно, все примеры кода на этой странице
предполагают, что вы используете Scala 3.
{% else %}
This doc page is specific to Scala 3,
and may cover new concepts not available in Scala 2. Unless
otherwise stated, all the code examples in this page assume
you are using Scala 3.
{% endif %}
{% else if include.language == 'scala2' %}
This doc page is specific to features shipped in Scala 2,
which have either been removed in Scala 3 or replaced by an
alternative. Unless otherwise stated, all the code examples
in this page assume you are using Scala 2.
{% if include.page-language == 'ru' %}
Эта страница документа относится к функциям, представленным в Scala 2,
которые либо были удалены в Scala 3, либо заменены альтернативными.
Если не указано явно, все примеры кода на этой странице предполагают,
что вы используете Scala 2.
{% else %}
This doc page is specific to features shipped in Scala 2,
which have either been removed in Scala 3 or replaced by an
alternative. Unless otherwise stated, all the code examples
in this page assume you are using Scala 2.
{% endif %}
{% endif %}
</span>
</blockquote>
Expand Down
Loading

0 comments on commit eba51b1

Please sign in to comment.