Skip to content

Commit 7ebfdd2

Browse files
authored
Publish spec (#18526)
[skip ci]
2 parents b03a648 + 11df1e0 commit 7ebfdd2

File tree

5 files changed

+90
-6
lines changed

5 files changed

+90
-6
lines changed

.github/workflows/spec.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Specification
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches-ignore:
8+
- 'gh-readonly-queue/**'
9+
pull_request:
10+
merge_group:
11+
workflow_dispatch:
12+
13+
env:
14+
DOTTY_CI_RUN: true
15+
16+
jobs:
17+
specification:
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
working-directory: ./docs/_spec
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
26+
# Keep in sync with ./docs/_spec/Dockerfile
27+
- uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: '2.7'
30+
- name: Install required gems
31+
run: |
32+
gem update --system
33+
gem install sass-embedded -v 1.58.0
34+
gem install bundler:1.17.2 jekyll
35+
bundle install
36+
npm install bower
37+
38+
- name: Build the specification
39+
run: |
40+
bundle exec jekyll build
41+
42+
# Deploy
43+
- name: Deployment
44+
env:
45+
USER_FOR_TEST: ${{ secrets.SPEC_DEPLOY_USER }}
46+
if: ${{ env.USER_FOR_TEST != '' }}
47+
uses: burnett01/[email protected]
48+
with:
49+
switches: -rzv
50+
path: docs/_spec/_site/
51+
remote_path: ${{ secrets.SPEC_DEPLOY_PATH }}
52+
remote_host: ${{ secrets.SPEC_DEPLOY_HOST }}
53+
remote_user: ${{ secrets.SPEC_DEPLOY_USER }}
54+
remote_key: ${{ secrets.SPEC_DEPLOY_KEY }}
55+
remote_key_pass: ${{ secrets.SPEC_DEPLOY_PASS }}

docs/_spec/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Keep in sync with relevant parts of .github/workflows/spec.yml
2+
13
FROM ruby:2.7
24

35
RUN apt-get install -y curl \

docs/_spec/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WIP Scala 3 Language Specification
22

3-
**This is still a work in progress, and should *not* be regarded as a source of truth.**
3+
**This is still a work in progress. There are still Scala 3 features missing, as well as some areas that have not been updated since 2.13 yet.**
44

55
First of all, the language specification is meant to be correct, precise and clear.
66

@@ -25,8 +25,8 @@ To preview locally, run the following commands in the docs/_spec subfolder:
2525
env UID="$(id -u)" GID="$(id -g)" docker-compose up
2626
```
2727

28-
and open http://0.0.0.0:4000/files/archive/spec/2.13/ to view the spec. Jekyll will rebuild as you edit the markdown, but make sure to restart it when you change `_config.yml`.
29-
<!--
28+
and open http://0.0.0.0:4000/files/archive/spec/3.4/ to view the spec. Jekyll will rebuild as you edit the markdown, but make sure to restart it when you change `_config.yml`.
29+
<!--
3030
To preview locally, run the following commands in the root of your checkout scala/scala:
3131
`bundle install` to install Jekyll and `bundle exec jekyll serve -d build/spec/ -s spec/ -w --baseurl=""` to start it,
3232
and open http://0.0.0.0:4000/ to view the spec. Jekyll will rebuild as you edit the markdown, but make sure to restart it when you change `_config.yml`.

docs/_spec/_config.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
baseurl: /files/archive/spec/2.13
2-
latestScalaVersion: 2.13
3-
thisScalaVersion: 2.13
1+
baseurl: /files/archive/spec/3.4
2+
latestScalaVersion: 3.4
3+
thisScalaVersion: 3.4
44
versionCompareMessage: "an upcoming"
55
safe: true
66
lsi: false
@@ -9,3 +9,15 @@ markdown: redcarpet
99
encoding: utf-8
1010
redcarpet:
1111
extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "tables", "with_toc_data", "strikethrough", "lax_spacing", "space_after_headers", "superscript", "footnotes", "disable_indented_code_blocks"]
12+
exclude:
13+
- APPLIEDreference
14+
- TODOreference
15+
- docker-compose.yml
16+
- Dockerfile
17+
- Gemfile
18+
- Gemfile.lock
19+
- README.md
20+
- spec-toc.xslt
21+
- package.json
22+
- package-lock.json
23+
- node_modules

docs/_spec/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ Martin Odersky, Philippe Altherr, Vincent Cremet, Sébastien Doeraene, Gilles Du
1111

1212
Markdown Conversion by Iain McGinniss.
1313

14+
#### Disclaimer: Work in Progress
15+
16+
This specification for Scala 3 is still a work in progress.
17+
Some features added in Scala 3 are missing.
18+
Here is a list of the most important missing aspects:
19+
20+
* `extension` methods
21+
* `given` and `using` contextual abstractions
22+
* type-class derivation with `derives`
23+
* behavior of structural types based on `Selectable`
24+
* meta-programming with `inline def`s and quotes
25+
* match types (pending a [Scala Improvement Proposal](https://github.com/scala/improvement-proposals/pull/65) with a full specification)
26+
27+
For those features, the best reference so far remains [the Scala 3 Reference](https://docs.scala-lang.org/scala3/reference/).
28+
1429
#### Preface
1530

1631
Scala is a Java-like programming language which unifies

0 commit comments

Comments
 (0)