Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into jdk-sbt-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue committed Oct 18, 2023
2 parents dd03c27 + cb48e9a commit a9d3a0d
Show file tree
Hide file tree
Showing 14 changed files with 381 additions and 22 deletions.
2 changes: 1 addition & 1 deletion _overviews/jdk-compatibility/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: JDK Compatibility
permalink: /overviews/jdk-compatibility/overview.html
---

Scala's primary platform is the Java Virtual Machine (JVM). (Other supported platforms: [Scala.js](https://www.scala-js.org/), [Scala Native](https://scala-native.readthedocs.io/).)
Scala's primary platform is the Java Virtual Machine (JVM). (Other supported platforms: [Scala.js](https://www.scala-js.org/), [Scala Native](https://scala-native.org/).)

Sometimes new JVM and JDK (Java Development Kit) versions require us to update Scala to remain compatible.

Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Concurrency
type: chapter
description: This page discusses how Scala concurrency works, with an emphasis on Scala Futures.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 68
previous-page: ca-summary
next-page: scala-tools
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/scala-for-javascript-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Also at a high level, some of the differences between JavaScript and Scala are:
- As a pure OOP language and a pure FP language, Scala encourages a fusion of OOP and FP, with functions for the logic and immutable objects for modularity
- Scala has state of the art, third-party, open source functional programming libraries
- Everything in Scala is an _expression_: constructs like `if` statements, `for` loops, `match` expressions, and even `try`/`catch` expressions all have return values
- The [Scala Native](https://scala-native.readthedocs.io/en/v0.3.9-docs) project lets you write “systems” level code, and also compiles to native executables
- The [Scala Native](https://scala-native.org/) project lets you write “systems” level code, and also compiles to native executables

### Programming level differences

Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/scala-for-python-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Also at a high level, the _differences_ between Python and Scala are:
- Though it’s statically typed, Scala features like type inference make it feel like a dynamic language
- Python is interpreted, and Scala code is compiled to _.class_ files, and runs on the Java Virtual Machine (JVM)
- In addition to running on the JVM, the [Scala.js](https://www.scala-js.org) project lets you use Scala as a JavaScript replacement
- The [Scala Native](https://scala-native.readthedocs.io/en/v0.3.9-docs) project lets you write “systems” level code, and compiles to native executables
- The [Scala Native](https://scala-native.org/) project lets you write “systems” level code, and compiles to native executables
- Everything in Scala is an _expression_: constructs like `if` statements, `for` loops, `match` expressions, and even `try`/`catch` expressions all have return values
- Scala idioms favor immutability by default: you’re encouraged to use immutable variables and immutable collections
- Scala has excellent support for [concurrent and parallel programming][concurrency]
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-book/scala-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Scala Tools
type: chapter
description: This chapter looks at two commonly-used Scala tools, sbt and ScalaTest.
languages: [zh-cn]
languages: [ru, zh-cn]
num: 69
previous-page: concurrency
next-page: tools-sbt
Expand Down
10 changes: 5 additions & 5 deletions _overviews/scala3-migration/tutorial-macro-mixing.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ lazy val example = project.in(file("example"))

lazy val `example-compat` = project.in(file("example-compat"))
.settings(
scalaVersion := "2.13.11",
libraryDependency += "org.scala-lang" % "scala-reflect" % scalaVersion.value
scalaVersion := "2.13.12",
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value
)
```

Expand Down Expand Up @@ -151,7 +151,7 @@ Since we want to execute the tests in Scala 2.13 and Scala 3, we create a cross-
lazy val `example-test` = project.in(file("example-test"))
.settings(
scalaVersion := "3.3.1",
crossScalaVersions := Seq("3.3.1", "2.13.11"),
crossScalaVersions := Seq("3.3.1", "2.13.12"),
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => Seq("-Ytasty-reader")
Expand Down Expand Up @@ -185,7 +185,7 @@ class MacrosSpec extends munit.FunSuite {
You should now be able to run the tests in both versions.

{% highlight text %}
sbt:example> ++2.13.11
sbt:example> ++2.13.12
sbt:example> example-test / test
location.MacrosSpec:
+ location
Expand Down Expand Up @@ -213,7 +213,7 @@ You are now ready to publish your library.
It can be used in Scala 3 projects, or in Scala 2.13 projects with these settings:

```scala
scalaVersion := "2.13.11"
scalaVersion := "2.13.12"
libraryDependencies += ("org" %% "example" % "x.y.z").cross(CrossVersion.for2_13Use3)
scalacOptions += "-Ytasty-reader"
```
2 changes: 1 addition & 1 deletion _overviews/scala3-migration/tutorial-prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.0")

### Scala Native

Scala 3 is now supported in Scala Native starting with [v0.4.3](https://scala-native.readthedocs.io/en/latest/changelog/0.4.3.html)
Scala 3 is supported in [Scala Native](https://scala-native.org/) since v0.4.3.

The minimal version of Scala 3 supported by Scala Native is 3.1.0, due to fatal blockers in Scala 3.0.x

Expand Down
20 changes: 14 additions & 6 deletions _ru/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ sections:
- title: "Книга по Scala 3"
description: "Изучайте Scala используя серию коротких уроков."
icon: "fa fa-book-open"
link: /scala3/book/introduction.html
link: /ru/scala3/book/introduction.html
- title: "Набор инструментов Scala"
description: "Отправка HTTP-запросов, запись файлов, запуск программ, обработка JSON..."
icon: "fa fa-toolbox"
link: /toolkit/introduction.html
- title: Онлайн Курсы, Упражнения и Блоги
description: "Обучающие курсы по Scala от новичка до продвинутого уровня."
icon: "fa fa-cloud"
Expand Down Expand Up @@ -55,10 +59,14 @@ sections:
description: "Список по наиболее часто задаваемым вопросам с ответами по функционалу Scala."
icon: "fa fa-question-circle"
link: /tutorials/FAQ/index.html
- title: "Спецификация"
description: "Официальная спецификация языка Scala."
- title: "Спецификация v2.x"
description: "Официальная спецификация языка Scala 2."
icon: "fa fa-book"
link: https://scala-lang.org/files/archive/spec/2.13/
- title: "Спецификация v3.x"
description: "Официальная спецификация языка Scala 3."
icon: "fa fa-book"
link: https://scala-lang.org/files/archive/spec/3.4/
- title: "Справочник по языку Scala 3"
description: "Справочник по языку Scala 3."
icon: "fa fa-book"
Expand All @@ -73,15 +81,15 @@ sections:
- title: "Новое в Scala 3"
description: "Обзор новой функциональности в Scala 3."
icon: "fa fa-star"
link: /scala3/new-in-scala3.html
link: /ru/scala3/new-in-scala3.html
- title: "Новая функциональность Scaladoc для Scala 3"
description: "Ключевые особенности новой функциональности Scaladoc."
icon: "fa fa-star"
link: /scala3/scaladoc.html
link: /ru/scala3/scaladoc.html
- title: "Выступления"
description: "Доступные онлайн выступления о Scala 3."
icon: "fa fa-play-circle"
link: /scala3/talks.html
link: /ru/scala3/talks.html

- title: "Развитие Scala"
links:
Expand Down
2 changes: 1 addition & 1 deletion _ru/scala3/book/ca-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: На этой странице представлен кратки
language: ru
num: 67
previous-page: ca-implicit-conversions
next-page:
next-page: concurrency
---

В этой главе представлено введение в большинство тем контекстных абстракций, в том числе:
Expand Down
Loading

0 comments on commit a9d3a0d

Please sign in to comment.