Skip to content

Commit 57f9d60

Browse files
authored
Merge pull request #14055 from BarkingBad/scaladoc/clean-preprocessing-leftovers
Scaladoc - clean preprocessing leftovers
2 parents 0367d6b + fc8abc6 commit 57f9d60

File tree

147 files changed

+496
-998
lines changed

Some content is hidden

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

147 files changed

+496
-998
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ jobs:
473473
DOTTY_WEBSITE_BOT_TOKEN: ${{ secrets.BOT_TOKEN }} # If you need to change this:
474474
# Generate one at https://github.com/settings/tokens
475475
# Make sure you have the write permissions to the repo: https://github.com/lampepfl/dotty-website
476-
DOCS_SCALALANG_BOT_TOKEN: ${{ secrets.DOCS_SCALALANG_BOT_TOKEN }} # If you need to change this:
476+
# Currently unused token, no need to deploy anything to docs.scala-lang
477+
# DOCS_SCALALANG_BOT_TOKEN: ${{ secrets.DOCS_SCALALANG_BOT_TOKEN }} # If you need to change this:
477478
# Generate one at https://github.com/settings/tokens
478479
# Make sure you have the write permissions to the repo: https://github.com/scala/docs.scala-lang
479480

.gitignore

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ cs
103103
# Coursier test product
104104
compiler/test-coursier/run/*.jar
105105

106-
# Docs
107-
docs-for-dotty-page/*
108-
109-
# docs.scala-lang deplyment temp dir
110-
docsScalaLang/
111-
docs/_site/
106+
# docs related
107+
contributors.js
108+
content-contributors.css

build.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ val scaladoc = Build.scaladoc
2222
val `scaladoc-testcases` = Build.`scaladoc-testcases`
2323
val `scaladoc-js-common` = Build.`scaladoc-js-common`
2424
val `scaladoc-js-main` = Build.`scaladoc-js-main`
25-
val `scaladoc-js-markdown` = Build.`scaladoc-js-markdown`
2625
val `scaladoc-js-contributors` = Build.`scaladoc-js-contributors`
2726
val `scala3-bench-run` = Build.`scala3-bench-run`
2827
val dist = Build.dist

docs/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/docs/reference/changed-features.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: doc-page
3+
title: "Other Changed Features"
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features.html
5+
---
6+
7+
The following pages document the features that have changed in Scala 3, compared to Scala 2.

docs/docs/reference/changed-features/compiler-plugins.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Changes in Compiler Plugins"
3-
type: section
4-
num: 68
5-
previous-page: /scala3/reference/changed-features/eta-expansion
6-
next-page: /scala3/reference/changed-features/lazy-vals-init
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/compiler-plugins.html
75
---
86

97
Compiler plugins are supported by Dotty (and Scala 3) since 0.9. There are two notable changes

docs/docs/reference/changed-features/eta-expansion-spec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
layout: singlepage-overview
3-
scala3: true
2+
layout: doc-page
43
title: "Automatic Eta Expansion - More Details"
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/eta-expansion-spec.html
55
---
66

77
## Motivation

docs/docs/reference/changed-features/eta-expansion.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Automatic Eta Expansion"
3-
type: section
4-
num: 67
5-
previous-page: /scala3/reference/changed-features/pattern-matching
6-
next-page: /scala3/reference/changed-features/compiler-plugins
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/eta-expansion.html
75
---
86

97
The conversion of _methods_ into _functions_ has been improved and happens automatically for methods with one or more parameters.
@@ -38,7 +36,7 @@ rather than `next _`.
3836
The reason for excluding nullary methods from automatic eta expansion
3937
is that Scala implicitly inserts the `()` argument, which would
4038
conflict with eta expansion. Automatic `()` insertion is
41-
[limited](../dropped-features/auto-apply.html) in Scala 3, but the fundamental ambiguity
39+
[limited](../dropped-features/auto-apply.md) in Scala 3, but the fundamental ambiguity
4240
remains.
4341

44-
[More details](eta-expansion-spec.html)
42+
[More details](eta-expansion-spec.md)

docs/docs/reference/changed-features/implicit-conversions-spec.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
layout: singlepage-overview
3-
scala3: true
2+
layout: doc-page
43
title: "Implicit Conversions - More Details"
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/implicit-conversions-spec.html
55
---
66

77
## Implementation
@@ -82,7 +82,7 @@ implicit val myConverter: Int => String = _.toString
8282
implicit val myConverter: Conversion[Int, String] = _.toString
8383
```
8484

85-
Note that implicit conversions are also affected by the [changes to implicit resolution](implicit-resolution.html) between Scala 2 and Scala 3.
85+
Note that implicit conversions are also affected by the [changes to implicit resolution](implicit-resolution.md) between Scala 2 and Scala 3.
8686

8787
## Motivation for the changes
8888

@@ -109,9 +109,9 @@ will report a type error, because `Map` isn't an instance of
109109
Implicit values that are used as views should see their type changed to `Conversion`.
110110

111111
For the migration of implicit conversions that are affected by the
112-
changes to implicit resolution, refer to the [Changes in Implicit Resolution](implicit-resolution.html) for more information.
112+
changes to implicit resolution, refer to the [Changes in Implicit Resolution](implicit-resolution.md) for more information.
113113

114114
## Reference
115115

116-
For more information about implicit resolution, see [Changes in Implicit Resolution](implicit-resolution.html).
116+
For more information about implicit resolution, see [Changes in Implicit Resolution](implicit-resolution.md).
117117
Other details are available in [PR #2065](https://github.com/lampepfl/dotty/pull/2065).

docs/docs/reference/changed-features/implicit-conversions.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Implicit Conversions"
3-
type: section
4-
num: 61
5-
previous-page: /scala3/reference/changed-features/implicit-resolution
6-
next-page: /scala3/reference/changed-features/overload-resolution
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/implicit-conversions.html
75
---
86

97
An _implicit conversion_, also called _view_, is a conversion that
@@ -63,4 +61,4 @@ implicitly[Ordering[A]] // Ok, will use the implicit conversion from
6361
// `A` to `Int` and the `Ordering` for `Int`.
6462
```
6563

66-
[More details](implicit-conversions-spec.html)
64+
[More details](implicit-conversions-spec.md)

docs/docs/reference/changed-features/implicit-resolution.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Changes in Implicit Resolution"
3-
type: section
4-
num: 60
5-
previous-page: /scala3/reference/changed-features/type-inference
6-
next-page: /scala3/reference/changed-features/implicit-conversions
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/implicit-resolution.html
75
---
86

97
This section describes changes to the implicit resolution that apply both to the new `given`s and to the old-style `implicit`s in Scala 3.

docs/docs/reference/changed-features/imports.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Imports"
3-
type: section
4-
num: 57
5-
previous-page: /scala3/reference/changed-features/wildcards
6-
next-page: /scala3/reference/changed-features/type-checking
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/imports.html
75
---
86

97
The syntax of wildcard and renaming imports (and exports) has changed.

docs/docs/reference/changed-features/interpolation-escapes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
layout: singlepage-overview
3-
scala3: true
2+
layout: doc-page
43
title: "Escapes in interpolations"
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/interpolation-escapes.html
55
---
66

77
In Scala 2 there is no straightforward way to represent a single quote character `"` in a single quoted interpolation. A `\` character can't be used for that because interpolators themselves decide how to handle escaping, so the parser doesn't know whether the `"` should be escaped or used as a terminator.

docs/docs/reference/changed-features/lazy-vals-init.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: Lazy Vals Initialization
3-
type: section
4-
num: 69
5-
previous-page: /scala3/reference/changed-features/compiler-plugins
6-
next-page: /scala3/reference/changed-features/main-functions
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/lazy-vals-init.html
75
---
86

97
Scala 3 implements [Version 6](https://docs.scala-lang.org/sips/improved-lazy-val-initialization.html#version-6---no-synchronization-on-this-and-concurrent-initialization-of-fields)

docs/docs/reference/changed-features/main-functions.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Main Methods"
3-
type: section
4-
num: 70
5-
previous-page: /scala3/reference/changed-features/lazy-vals-init
6-
next-page: /scala3/reference/dropped-features
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/main-functions.html
75
---
86

97
Scala 3 offers a new way to define programs that can be invoked from the command line:
@@ -87,5 +85,5 @@ object happyBirthday extends App:
8785
...
8886
```
8987

90-
The previous functionality of `App`, which relied on the "magic" [`DelayedInit`]({% link _scala3-reference/dropped-features/delayed-init.md %}) trait, is no longer available. [`App`](https://scala-lang.org/api/3.x/scala/App.html) still exists in limited form for now, but it does not support command line arguments and will be deprecated in the future. If programs need to cross-build
88+
The previous functionality of `App`, which relied on the "magic" [`DelayedInit`](../dropped-features/delayed-init.md) trait, is no longer available. [`App`](https://scala-lang.org/api/3.x/scala/App.md) still exists in limited form for now, but it does not support command line arguments and will be deprecated in the future. If programs need to cross-build
9189
between Scala 2 and Scala 3, it is recommended to use an explicit `main` method with an `Array[String]` argument instead.

docs/docs/reference/changed-features/match-syntax.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Match Expressions"
3-
type: section
4-
num: 63
5-
previous-page: /scala3/reference/changed-features/overload-resolution
6-
next-page: /scala3/reference/changed-features/vararg-splices
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/match-syntax.html
75
---
86

97
The syntactical precedence of match expressions has been changed.
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Numeric Literals"
3-
type: section
4-
num: 53
5-
previous-page: /scala3/reference/changed-features
6-
next-page: /scala3/reference/changed-features/structural-types
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/numeric-literals.html
75
---
86

97
[Document was moved](../experimental/numeric-literals.md)

docs/docs/reference/changed-features/operators.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
---
2+
layout: doc-page
23
title: "Rules for Operators"
3-
type: section
4-
num: 55
5-
previous-page: /scala3/reference/changed-features/structural-types
6-
next-page: /scala3/reference/changed-features/wildcards
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/operators.html
75
---
86

97
The rules for infix operators have changed in some parts:
108

119
First, an alphanumeric method can be used as an infix operator only if its definition carries an `infix` modifier. Second, it is recommended (but not enforced) to
12-
augment definitions of symbolic operators with [`@targetName` annotations](../other-new-features/targetName.html). Finally,
10+
augment definitions of symbolic operators with [`@targetName` annotations](../other-new-features/targetName.md). Finally,
1311
a syntax change allows infix operators to be written on the left in a multi-line expression.
1412

1513
## The `infix` Modifier
@@ -99,7 +97,7 @@ or if the `-source future` option is given in Dotty/Scala 3.
9997

10098
## The `@targetName` Annotation
10199

102-
It is recommended that definitions of symbolic operators carry a [`@targetName` annotation](../other-new-features/targetName.html) that provides an encoding of the operator with an alphanumeric name. This has several benefits:
100+
It is recommended that definitions of symbolic operators carry a [`@targetName` annotation](../other-new-features/targetName.md) that provides an encoding of the operator with an alphanumeric name. This has several benefits:
103101

104102
- It helps interoperability between Scala and other languages. One can call
105103
a Scala-defined symbolic operator from another language using its target name,

docs/docs/reference/changed-features/overload-resolution.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Changes in Overload Resolution"
3-
type: section
4-
num: 62
5-
previous-page: /scala3/reference/changed-features/implicit-conversions
6-
next-page: /scala3/reference/changed-features/match-syntax
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/overload-resolution.html
75
---
86

97
Overload resolution in Scala 3 improves on Scala 2 in two ways.
@@ -44,7 +42,7 @@ resolution yields several competing alternatives when `n >= 1` parameter lists a
4442
into account, then resolution re-tried using `n + 1` argument lists.
4543

4644
This change is motivated by the new language feature
47-
[extension methods](../contextual/extension-methods.html), where emerges the need to do
45+
[extension methods](../contextual/extension-methods.md), where emerges the need to do
4846
overload resolution based on additional argument blocks.
4947

5048
## Parameter Types of Function Values

docs/docs/reference/changed-features/pattern-bindings.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Pattern Bindings"
3-
type: section
4-
num: 65
5-
previous-page: /scala3/reference/changed-features/vararg-splices
6-
next-page: /scala3/reference/changed-features/pattern-matching
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/pattern-bindings.html
75
---
86

97
In Scala 2, pattern bindings in `val` definitions and `for` expressions are

docs/docs/reference/changed-features/pattern-matching.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Option-less pattern matching"
3-
type: section
4-
num: 66
5-
previous-page: /scala3/reference/changed-features/pattern-bindings
6-
next-page: /scala3/reference/changed-features/eta-expansion
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/pattern-matching.html
75
---
86

97
The implementation of pattern matching in Scala 3 was greatly simplified compared to Scala 2. From a user perspective, this means that Scala 3 generated patterns are a *lot* easier to debug, as variables all show up in debug modes and positions are correctly preserved.
@@ -243,4 +241,4 @@ Abstract type testing with `ClassTag` is replaced with `TypeTest` or the alias `
243241
- pattern `_: X` for an abstract type requires a `TypeTest` in scope
244242
- pattern `x @ X()` for an unapply that takes an abstract type requires a `TypeTest` in scope
245243

246-
[More details on `TypeTest`](../other-new-features/type-test.html)
244+
[More details on `TypeTest`](../other-new-features/type-test.md)

docs/docs/reference/changed-features/structural-types-spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
layout: singlepage-overview
3-
scala3: true
2+
layout: doc-page
43
title: "Programmatic Structural Types - More Details"
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/structural-types-spec.html
55
---
66

77
## Syntax
@@ -81,7 +81,7 @@ and `Rs` are structural refinement declarations, and given `v.a` of type `U`, we
8181

8282
Note that `v`'s static type does not necessarily have to conform to `Selectable`, nor does it need to have `selectDynamic` and `applyDynamic` as members. It suffices that there is an implicit
8383
conversion that can turn `v` into a `Selectable`, and the selection methods could also be available as
84-
[extension methods](../contextual/extension-methods.html).
84+
[extension methods](../contextual/extension-methods.md).
8585

8686
## Limitations of Structural Types
8787

docs/docs/reference/changed-features/structural-types.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Programmatic Structural Types"
3-
type: section
4-
num: 54
5-
previous-page: /scala3/reference/changed-features/numeric-literals
6-
next-page: /scala3/reference/changed-features/operators
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/structural-types.html
75
---
86

97
## Motivation
@@ -191,4 +189,4 @@ differences.
191189
`java.lang.Class` arguments indicating the method's formal parameter types.
192190
`Dynamic` comes with `updateDynamic`.
193191

194-
[More details](structural-types-spec.html)
192+
[More details](structural-types-spec.md)
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Changes in Type Checking"
3-
type: section
4-
num: 58
5-
previous-page: /scala3/reference/changed-features/imports
6-
next-page: /scala3/reference/changed-features/type-inference
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/type-checking.html
75
---
86

97
*** **TO BE FILLED IN** ***

docs/docs/reference/changed-features/type-inference.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Changes in Type Inference"
3-
type: section
4-
num: 59
5-
previous-page: /scala3/reference/changed-features/type-checking
6-
next-page: /scala3/reference/changed-features/implicit-resolution
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/type-inference.html
75
---
86

97
For more information, see the two presentations

docs/docs/reference/changed-features/vararg-splices.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: "Vararg Splices"
3-
type: section
4-
num: 64
5-
previous-page: /scala3/reference/changed-features/match-syntax
6-
next-page: /scala3/reference/changed-features/pattern-bindings
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/vararg-splices.html
75
---
86

97
The syntax of vararg splices in patterns and function arguments has changed. The new syntax uses a postfix `*`, analogously to how a vararg parameter is declared.

docs/docs/reference/changed-features/wildcards.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2+
layout: doc-page
23
title: Wildcard Arguments in Types
3-
type: section
4-
num: 56
5-
previous-page: /scala3/reference/changed-features/operators
6-
next-page: /scala3/reference/changed-features/imports
4+
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/wildcards.html
75
---
86

97
The syntax of wildcard arguments in types has changed from `_` to `?`. Example:

0 commit comments

Comments
 (0)