Skip to content

Commit

Permalink
Publish spec (scala#18526)
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
sjrd authored Sep 25, 2023
2 parents b03a648 + 11df1e0 commit 7ebfdd2
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 6 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Specification

on:
push:
tags:
- '*'
branches-ignore:
- 'gh-readonly-queue/**'
pull_request:
merge_group:
workflow_dispatch:

env:
DOTTY_CI_RUN: true

jobs:
specification:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs/_spec

steps:
- uses: actions/checkout@v3

# Keep in sync with ./docs/_spec/Dockerfile
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Install required gems
run: |
gem update --system
gem install sass-embedded -v 1.58.0
gem install bundler:1.17.2 jekyll
bundle install
npm install bower
- name: Build the specification
run: |
bundle exec jekyll build
# Deploy
- name: Deployment
env:
USER_FOR_TEST: ${{ secrets.SPEC_DEPLOY_USER }}
if: ${{ env.USER_FOR_TEST != '' }}
uses: burnett01/[email protected]
with:
switches: -rzv
path: docs/_spec/_site/
remote_path: ${{ secrets.SPEC_DEPLOY_PATH }}
remote_host: ${{ secrets.SPEC_DEPLOY_HOST }}
remote_user: ${{ secrets.SPEC_DEPLOY_USER }}
remote_key: ${{ secrets.SPEC_DEPLOY_KEY }}
remote_key_pass: ${{ secrets.SPEC_DEPLOY_PASS }}
2 changes: 2 additions & 0 deletions docs/_spec/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Keep in sync with relevant parts of .github/workflows/spec.yml

FROM ruby:2.7

RUN apt-get install -y curl \
Expand Down
6 changes: 3 additions & 3 deletions docs/_spec/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WIP Scala 3 Language Specification

**This is still a work in progress, and should *not* be regarded as a source of truth.**
**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.**

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

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

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`.
<!--
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`.
<!--
To preview locally, run the following commands in the root of your checkout scala/scala:
`bundle install` to install Jekyll and `bundle exec jekyll serve -d build/spec/ -s spec/ -w --baseurl=""` to start it,
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`.
Expand Down
18 changes: 15 additions & 3 deletions docs/_spec/_config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
baseurl: /files/archive/spec/2.13
latestScalaVersion: 2.13
thisScalaVersion: 2.13
baseurl: /files/archive/spec/3.4
latestScalaVersion: 3.4
thisScalaVersion: 3.4
versionCompareMessage: "an upcoming"
safe: true
lsi: false
Expand All @@ -9,3 +9,15 @@ markdown: redcarpet
encoding: utf-8
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "tables", "with_toc_data", "strikethrough", "lax_spacing", "space_after_headers", "superscript", "footnotes", "disable_indented_code_blocks"]
exclude:
- APPLIEDreference
- TODOreference
- docker-compose.yml
- Dockerfile
- Gemfile
- Gemfile.lock
- README.md
- spec-toc.xslt
- package.json
- package-lock.json
- node_modules
15 changes: 15 additions & 0 deletions docs/_spec/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ Martin Odersky, Philippe Altherr, Vincent Cremet, Sébastien Doeraene, Gilles Du

Markdown Conversion by Iain McGinniss.

#### Disclaimer: Work in Progress

This specification for Scala 3 is still a work in progress.
Some features added in Scala 3 are missing.
Here is a list of the most important missing aspects:

* `extension` methods
* `given` and `using` contextual abstractions
* type-class derivation with `derives`
* behavior of structural types based on `Selectable`
* meta-programming with `inline def`s and quotes
* match types (pending a [Scala Improvement Proposal](https://github.com/scala/improvement-proposals/pull/65) with a full specification)

For those features, the best reference so far remains [the Scala 3 Reference](https://docs.scala-lang.org/scala3/reference/).

#### Preface

Scala is a Java-like programming language which unifies
Expand Down

0 comments on commit 7ebfdd2

Please sign in to comment.