8000 Merge branch 'scala:main' into patch-1 · rssh/scala.github.com@330fc4e · GitHub
[go: up one dir, main page]

Skip to content

Commit 330fc4e

Browse files
authored
Merge branch 'scala:main' into patch-1
2 parents 6ea617d + e657879 commit 330fc4e

File tree

104 files changed

+1581
-447
lines changed
  • compiler-options
  • contribute
  • jdk-compatibility
  • scala-book
  • scala3-book
  • scala3-macros/tutorial
  • scala3-migration
  • scala3-scaladoc
  • tutorials
  • _ru
  • _sass
  • _sips
  • _tour
  • _uk/scala3
  • _zh-cn
  • api
  • resources/js
  • scala3
  • scripts
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    104 files changed

    +1581
    -447
    lines changed

    .github/workflows/build.yml

    Lines changed: 3 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,14 +4,14 @@ jobs:
    44
    build:
    55
    runs-on: ubuntu-20.04
    66
    steps:
    7-
    - uses: actions/checkout@v3
    7+
    - uses: actions/checkout@v4
    88
    - name: Set up Ruby
    99
    uses: ruby/setup-ruby@v1
    1010
    with:
    1111
    ruby-version: 3.0.5
    1212
    bundler-cache: true
    1313
    - name: Set up coursier
    14-
    uses: coursier/setup-action@v1.2.0-M2
    14+
    uses: coursier/setup-action@v1.3.5
    1515
    with:
    1616
    jvm: adopt:11
    1717
    - name: Run mdoc
    @@ -29,5 +29,5 @@ jobs:
    2929
    --ignore-empty-alt\
    3030
    --allow-hash-href\
    3131
    --enforce-https=false\
    32-
    --ignore-urls '/https://github.com/scala/docs.scala-lang/blob/main/.*/,/www.oracle.com/'
    32+
    --ignore-urls '/https://github.com/scala/,/www.oracle.com/'
    3333

    Gemfile.lock

    Lines changed: 65 additions & 49 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,46 +1,57 @@
    11
    GEM
    22
    remote: https://rubygems.org/
    33
    specs:
    4-
    activesupport (7.0.7.2)
    4+
    activesupport (7.1.3)
    5+
    base64
    6+
    bigdecimal
    57
    concurrent-ruby (~> 1.0, >= 1.0.2)
    8+
    connection_pool (>= 2.2.5)
    9+
    drb
    610
    i18n (>= 1.6, < 2)
    711
    minitest (>= 5.1)
    12+
    mutex_m
    813
    tzinfo (~> 2.0)
    9-
    addressable (2.8.1)
    14+
    addressable (2.8.6)
    1015
    public_suffix (>= 2.0.2, < 6.0)
    16+
    base64 (0.2.0)
    17+
    bigdecimal (3.1.6)
    1118
    coffee-script (2.4.1)
    1219
    coffee-script-source
    1320
    execjs
    14-
    coffee-script-source (1.11.1)
    21+
    coffee-script-source (1.12.2)
    1522
    colorator (1.1.0)
    1623
    commonmarker (0.23.10)
    17-
    concurrent-ruby (1.2.2)
    18-
    dnsruby (1.61.9)
    19-
    simpleidn (~> 0.1)
    24+
    concurrent-ruby (1.2.3)
    25+
    connection_pool (2.4.1)
    26+
    dnsruby (1.70.0)
    27+
    simpleidn (~> 0.2.1)
    28+
    drb (2.2.0)
    29+
    ruby2_keywords
    2030
    em-websocket (0.5.3)
    2131
    eventmachine (>= 0.12.9)
    2232
    http_parser.rb (~> 0)
    2333
    ethon (0.16.0)
    2434
    ffi (>= 1.15.0)
    2535
    eventmachine (1.2.7)
    26-
    execjs (2.8.1)
    27-
    faraday (2.7.4)
    28-
    faraday-net_http (>= 2.0, < 3.1)
    29-
    ruby2_keywords (>= 0.0.4)
    30-
    faraday-net_http (3.0.2)
    31-
    ffi (1.15.5)
    36+
    execjs (2.9.1)
    37+
    faraday (2.9.0)
    38+
    faraday-net_http (>= 2.0, < 3.2)
    39+
    faraday-net_http (3.1.0)
    40+
    net-http
    41+
    ffi (1.16.3)
    42+
    ffi (1.16.3-x64-mingw-ucrt)
    3243
    forwardable-extended (2.6.0)
    33-
    gemoji (3.0.1)
    34-
    github-pages (228)
    35-
    github-pages-health-check (= 1.17.9)
    36-
    jekyll (= 3.9.3)
    37-
    jekyll-avatar (= 0.7.0)
    38-
    jekyll-coffeescript (= 1.1.1)
    44+
    gemoji (4.1.0)
    45+
    github-pages (231)
    46+
    github-pages-health-check (= 1.18.2)
    47+
    jekyll (= 3.9.5)
    48+
    jekyll-avatar (= 0.8.0)
    49+
    jekyll-coffeescript (= 1.2.2)
    3950
    jekyll-commonmark-ghpages (= 0.4.0)
    40-
    jekyll-default-layout (= 0.1.4)
    41-
    jekyll-feed (= 0.15.1)
    51+
    jekyll-default-layout (= 0.1.5)
    52+
    jekyll-feed (= 0.17.0)
    4253
    jekyll-gist (= 1.5.0)
    43-
    jekyll-github-metadata (= 2.13.0)
    54+
    jekyll-github-metadata (= 2.16.1)
    4455
    jekyll-include-cache (= 0.2.1)
    4556
    jekyll-mentions (= 1.6.0)
    4657
    jekyll-optional-front-matter (= 0.3.2)
    @@ -67,20 +78,20 @@ GEM
    6778
    jekyll-theme-tactile (= 0.2.0)
    6879
    jekyll-theme-time-machine (= 0.2.0)
    6980
    jekyll-titles-from-headings (= 0.5.3)
    70-
    jemoji (= 0.12.0)
    71-
    kramdown (= 2.3.2)
    81+
    jemoji (= 0.13.0)
    82+
    kramdown (= 2.4.0)
    7283
    kramdown-parser-gfm (= 1.1.0)
    7384
    liquid (= 4.0.4)
    7485
    mercenary (~> 0.3)
    7586
    minima (= 2.5.1)
    7687
    nokogiri (>= 1.13.6, < 2.0)
    77-
    rouge (= 3.26.0)
    88+
    rouge (= 3.30.0)
    7889
    terminal-table (~> 1.4)
    79-
    github-pages-health-check (1.17.9)
    90+
    github-pages-health-check (1.18.2)
    8091
    addressable (~> 2.3)
    8192
    dnsruby (~> 1.60)
    82-
    octokit (~> 4.0)
    83-
    public_suffix (>= 3.0, < 5.0)
    93+
    octokit (>= 4, < 8)
    94+
    public_suffix (>= 3.0, < 6.0)
    8495
    typhoeus (~> 1.3)
    8596
    html-pipeline (2.14.3)
    8697
    activesupport (>= 2)
    @@ -97,7 +108,7 @@ GEM
    97108
    http_parser.rb (0.8.0)
    98109
    i18n (1.14.1)
    99110
    concurrent-ruby (~> 1.0)
    100-
    jekyll (3.9.3)
    111+
    jekyll (3.9.5)
    101112
    addressable (~> 2.4)
    102113
    colorator (~> 1.0)
    103114
    em-websocket (~> 0.5)
    @@ -110,27 +121,27 @@ GEM
    110121
    pathutil (~> 0.9)
    111122
    rouge (>= 1.7, < 4)
    112123
    safe_yaml (~> 1.0)
    113-
    jekyll-avatar (0.7.0)
    124+
    jekyll-avatar (0.8.0)
    114125
    jekyll (>= 3.0, < 5.0)
    115-
    jekyll-coffeescript (1.1.1)
    126+
    jekyll-coffeescript (1.2.2)
    116127
    coffee-script (~> 2.2)
    117-
    coffee-script-source (~> 1.11.1)
    128+
    coffee-script-source (~> 1.12)
    118129
    jekyll-commonmark (1.4.0)
    119130
    commonmarker (~> 0.22)
    120131
    jekyll-commonmark-ghpages (0.4.0)
    121132
    commonmarker (~> 0.23.7)
    122133
    jekyll (~> 3.9.0)
    123134
    jekyll-commonmark (~> 1.4.0)
    124135
    rouge (>= 2.0, < 5.0)
    125-
    jekyll-default-layout (0.1.4)
    126-
    jekyll (~> 3.0)
    127-
    jekyll-feed (0.15.1)
    136+
    jekyll-default-layout (0.1.5)
    137+
    jekyll (>= 3.0, < 5.0)
    138+
    jekyll-feed (0.17.0)
    128139
    jekyll (>= 3.7, < 5.0)
    129140
    jekyll-gist (1.5.0)
    130141
    octokit (~> 4.2)
    131-
    jekyll-github-metadata (2.13.0)
    142+
    jekyll-github-metadata (2.16.1)
    132143
    jekyll (>= 3.4, < 5.0)
    133-
    octokit (~> 4.0, != 4.4.0)
    144+
    octokit (>= 4, < 7, != 4.4.0)
    134145
    jekyll-include-cache (0.2.1)
    135146
    jekyll (>= 3.7, < 5.0)
    136147
    jekyll-mentions (1.6.0)
    @@ -201,11 +212,11 @@ GEM
    201212
    jekyll (>= 3.3, < 5.0)
    202213
    jekyll-watch (2.2.1)
    203214
    listen (~> 3.0)
    204-
    jemoji (0.12.0)
    205-
    gemoji (~> 3.0)
    215+
    jemoji (0.13.0)
    216+
    gemoji (>= 3, < 5)
    206217
    html-pipeline (~> 2.2)
    207218
    jekyll (>= 3.0, < 5.0)
    208-
    kramdown (2.3.2)
    219+
    kramdown (2.4.0)
    209220
    rexml
    210221
    kramdown-parser-gfm (1.1.0)
    211222
    kramdown (~> 2.0)
    @@ -218,27 +229,30 @@ GEM
    218229
    jekyll (>= 3.5, < 5.0)
    219230
    jekyll-feed (~> 0.9)
    220231
    jekyll-seo-tag (~> 2.1)
    221-
    minitest (5.19.0)
    222-
    nokogiri (1.14.3-arm64-darwin)
    232+
    minitest (5.22.2)
    233+
    mutex_m (0.2.0)
    234+
    net-http (0.4.1)
    235+
    uri
    236+
    nokogiri (1.16.2-arm64-darwin)
    223237
    racc (~> 1.4)
    224-
    nokogiri (1.14.3-x64-mingw-ucrt)
    238+
    nokogiri (1.16.2-x64-mingw-ucrt)
    225239
    racc (~> 1.4)
    226-
    nokogiri (1.14.3-x86_64-linux)
    240+
    nokogiri (1.16.2-x86_64-linux)
    227241
    racc (~> 1.4)
    228242
    octokit (4.25.1)
    229243
    faraday (>= 1, < 3)
    230244
    sawyer (~> 0.9)
    231245
    parallel (1.22.1)
    232246
    pathutil (0.16.2)
    233247
    forwardable-extended (~> 2.6)
    234-
    public_suffix (4.0.7)
    235-
    racc (1.6.2)
    248+
    public_suffix (5.0.4)
    249+
    racc (1.7.3)
    236250
    rainbow (3.1.1)
    237251
    rb-fsevent (0.11.2)
    238252
    rb-inotify (0.10.1)
    239253
    ffi (~> 1.0)
    240-
    rexml (3.2.5)
    241-
    rouge (3.26.0)
    254+
    rexml (3.2.6)
    255+
    rouge (3.30.0)
    242256
    ruby2_keywords (0.0.5)
    243257
    rubyzip (2.3.2)
    244258
    safe_yaml (1.0.5)
    @@ -254,14 +268,16 @@ GEM
    254268
    unf (~> 0.1.4)
    255269
    terminal-table (1.8.0)
    256270
    unicode-display_width (~> 1.1, >= 1.1.1)
    257-
    typhoeus (1.4.0)
    271+
    typhoeus (1.4.1)
    258272
    ethon (>= 0.9.0)
    259273
    tzinfo (2.0.6)
    260274
    concurrent-ruby (~> 1.0)
    261275
    unf (0.1.4)
    262276
    unf_ext
    263-
    unf_ext (0.0.8.2)
    277+
    unf_ext (0.0.9.1)
    278+
    unf_ext (0.0.9.1-x64-mingw-ucrt)
    264279
    unicode-display_width (1.8.0)
    280+
    uri (0.13.0)
    265281
    webrick (1.8.1)
    266282
    yell (2.2.2)
    267283
    zeitwerk (2.6.7)

    README.md

    Lines changed: 5 additions & 5 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,11 +4,15 @@
    44

    55
    This repository contains the source for the Scala documentation website, as well as the source for "Scala Improvement Process" (SIP) documents.
    66

    7+
    ## Dependencies ##
    8+
    9+
    This site uses a Jekyll, a Ruby framework. You'll need Ruby and Bundler installed; see [Jekyll installation instructions](https://jekyllrb.com/docs/installation/) for the details.
    10+
    711
    ## Quickstart ##
    812

    913
    To build and view the site locally:
    1014

    11-
    gem install --user-install bundler jekyll
    15+
    bundle install
    1216
    bundle exec jekyll serve -I
    1317

    1418
    ([Trouble on MacOS?](https://github.com/scala/docs.scala-lang/issues/1150))
    @@ -53,10 +57,6 @@ Small changes, or corrected typos will generally be pulled in right away. Large
    5357
    existing documents will be thoroughly reviewed-- please keep in mind that, generally, new documents must be very well-polished, complete, and maintained
    5458
    in order to be accepted.
    5559

    56-
    ## Dependencies ##
    57-
    58-
    This site uses a Jekyll, a Ruby framework. You'll need Ruby and Bundler installed; see [Jekyll installation instructions](https://jekyllrb.com/docs/installation/) for the details.
    59-
    6060
    ## Building & Viewing ##
    6161

    6262
    cd into the directory where you cloned this repository, then install the required gems with `bundle install`. This will automatically put the gems into `./vendor/bundle`.

    _config.yml

    Lines changed: 3 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -15,9 +15,9 @@ keywords:
    1515
    - Document
    1616
    - Guide
    1717

    18-
    scala-version: 2.13.12
    19-
    scala-212-version: 2.12.18
    20-
    scala-3-version: 3.3.1
    18+
    scala-version: 2.13.13
    19+
    scala-212-version: 2.12.19
    20+
    scala-3-version: 3.4.0
    2121

    2222
    collections:
    2323
    style:

    _data/messages.yml

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1 @@
    1+
    scam-banner: "**⚠️ Beware of Scams**: since Feb 2024, scammers are using [fake Scala websites to sell courses](https://www.scala-lang.org/blog/2024/03/01/fake-scala-courses.html), please check you are using an official source."

    _includes/alert-banner.html

    Lines changed: 8 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,8 @@
    1+
    {% comment %}use the variable 'message' to include markdown text to display in the alert.{% endcomment %}
    2+
    3+
    <header id="site-header" class="header-home">
    4+
    <div class="new-on-the-blog alert-warning" data-message_id="{{include.message_id}}">
    5+
    <p>{{include.message|markdownify}}</p>
    6+
    <span class="hide"><i class="fa fa-close"></i></span>
    7+
    </div>
    8+
    </header>

    _includes/navbar-inner.html

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -23,7 +23,7 @@
    2323
    <li class="navigation-menu-item">
    2424
    {% capture translatedPageId %}/{{page.language}}{{navItem.url | remove_first: '.html' }}{% endcapture %}
    2525
    {% assign navItemTranslated = site.documents | where: 'id', translatedPageId | first %}
    26-
    <a href="{% if navItemTranslated.url %}{{navItemTranslated.url}}{% elsif navItem.url contains '://' or navItem.url == '#' %}{{navItem.url}}{% else %}{{site.baseurl}}{{navItem.url}}{% endif %}" id="{{ navItem.title | downcase | strip }}" {% if page.url contains navItem.url %}class="active"{% endif %}>{{navItem.title}}</a>
    26+
    <a href="{% if navItemTranslated.url %}{{navItemTranslated.url}}{% elsif navItem.url contains '://' or navItem.url == '#' %}{{navItem.url}}{% else %}{{site.baseurl}}{{navItem.url}}{% endif %}" id="{{ navItem.title | downcase | strip | remove: ' ' }}" {% if page.url contains navItem.url %}class="active"{% endif %}>{{navItem.title}}</a>
    2727
    {% if navItem.submenu %}
    2828
    <ul class="navigation-dropdown">
    2929
    {% for subItem in navItem.submenu %}
    @@ -42,7 +42,7 @@
    4242
    <nav class="doc-navigation-submenus">
    4343
    {% for navItem in navdata %}
    4444
    {% if navItem.submenu %}
    45-
    <ul class="navigation-submenu" id="{{ navItem.title | downcase | strip }}" style="display: none;">
    45+
    <ul class="navigation-submenu" id="{{ navItem.title | downcase | strip | remove: ' ' }}" style="display: none;">
    4646
    {% for subItem in navItem.submenu %}
    4747
    <li>
    4848
    <a href="{% if subItem.url contains '://' %}{{subItem.url}}{% else %}{{site.baseurl}}{{subItem.url}}{% endif %}">{{ subItem.title }}</a>

    _it/tutorials/scala-for-java-programmers.md

    Lines changed: 4 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -262,7 +262,7 @@ modo: `new Complex(1.5, 2.3)`. La classe ha due metodi, `re` e `im` che
    262262
    danno l’accesso rispettivamente alla parte reale e a quella immaginaria
    263263
    del numero complesso.
    264264

    265-
    Da notare che il tipo di ritorno dei due metodi non è specificato esplicitamante.
    265+
    Da notare che il tipo di ritorno dei due metodi non è specificato esplicitamente.
    266266
    Sarà il compilatore che lo dedurrà automaticamente osservando la parte a destra
    267267
    del segno uguale dei metodi e deducendo che per entrambi si tratta di
    268268
    valori di tipo `Double`.
    @@ -419,7 +419,7 @@ detto in Scala non è difficile:
    419419
    }
    420420

    421421
    Questa funzione di valutazione lavora effettuando un *pattern matching*
    422-
    sull’albero `t`. Intuitivamente il significato della definizione precendente
    422+
    sull’albero `t`. Intuitivamente il significato della definizione precedente
    423423
    dovrebbe esser chiaro:
    424424

    425425
    1. prima controlla se l’albero `t` è un `Sum`; se lo è, esegue il bind del
    @@ -557,7 +557,7 @@ dichiarazione di un trait:
    557557
    }
    558558

    559559
    Questa definizione crea un nuovo tipo chiamato `Ord` che ha lo stesso
    560-
    ruolo dell’interfaccia `Comparable` in Java e, fornisce l’implementazione
    560+
    ruolo dell’interfaccia `Comparable` in Java e fornisce l’implementazione
    561561
    di default di tre predicati in termini del quarto astraendone uno.
    562562
    I predicati di uguaglianza e disuguaglianza non sono presenti in questa
    563563
    dichiarazione poichè sono presenti di default in tutti gli oggetti.
    @@ -646,7 +646,7 @@ restrittivo.
    646646
    I programmatori Java hanno fatto ricorso all’uso di `Object`, che è il
    647647
    super-tipo di tutti gli oggetti. Questa soluzione è in ogni caso ben lontana
    648648
    dall’esser ideale perché non funziona per i tipi base (`int`, `long`, `float`,
    649-
    ecc.) ed implica che molto type casts dinamico deve esser fatto dal
    649+
    ecc.) ed implica che molto type cast dinamico deve esser fatto dal
    650650
    programmatore.
    651651

    652652
    Scala rende possibile la definizione delle classi generiche (e metodi) per

    _ja/scala3/contribute-to-docs.md

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -55,8 +55,8 @@ Scala 3 コンパイラとライブラリへの貢献と内部に関する包括
    5555
    ## Scala 3 Language Reference
    5656
    The [Dotty reference]({{ site.scala3ref }}/overview.html) は Scala 3 になる予定である。これにはさまざまな言語仕様に関する公式のプレゼンテーションや技術的情報が含まれている。
    5757

    58-
    - [Sources](https://github.com/lampepfl/dotty/tree/main/docs/_docs)
    59-
    - [Issues](https://github.com/lampepfl/dotty/issues)
    58+
    - [Sources](https://github.com/scala/scala3/tree/main/docs/_docs)
    59+
    - [Issues](https://github.com/scala/scala3/issues)
    6060

    6161

    6262
    [scala3-book]: {% link _overviews/scala3-book/introduction.md %}

    _layouts/root-content-layout.html

    Lines changed: 2 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -3,6 +3,8 @@
    33

    44
    <div class="navigation-fade-screen"></div>
    55

    6+
    {% include alert-banner.html message=site.data.messages.scam-banner message_id='scam-courses-feb-2024' %}
    7+
    68
    {% include navbar-inner.html %}
    79

    810
    <main id="inner-main">

    0 commit comments

    Comments
     (0)
    0