Skip to content

Commit 01c70a2

Browse files
authored
Merge pull request #13587 from BarkingBad/scaladoc/move-docs
Add script for docs preprocessing for static site
2 parents 6b721b6 + deaa6c1 commit 01c70a2

File tree

136 files changed

+1285
-826
lines changed

Some content is hidden

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

136 files changed

+1285
-826
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,6 @@ cs
102102

103103
# Coursier test product
104104
compiler/test-coursier/run/*.jar
105+
106+
# Docs
107+
docs-for-dotty-page/*

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This directory is for keeping all the compiler related docs.
2+
3+
For serving this files, one should notice that files under `docs/docs/reference` and `docs/docs/usage/scaladoc` are designed to be compatible with `docs.scala-lang` jekyll page.
4+
Preprocessing the sources to be compatible with scaladoc static site is done via script at `project/CopyDocs.scala`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "Other Changed Features"
3+
type: chapter
4+
num: 51
5+
previous-page: /scala3/reference/other-new-features/type-test
6+
next-page: /scala3/reference/changed-features/numeric-literals
7+
---
8+
9+
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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
layout: doc-page
32
title: "Changes in Compiler Plugins"
4-
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/compiler-plugins.html
3+
type: section
4+
num: 67
5+
previous-page: /scala3/reference/changed-features/eta-expansion
6+
next-page: /scala3/reference/changed-features/lazy-vals-init
57
---
68

79
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: doc-page
2+
layout: singlepage-overview
3+
scala3: true
34
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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
layout: doc-page
32
title: "Automatic Eta Expansion"
4-
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/eta-expansion.html
3+
type: section
4+
num: 66
5+
previous-page: /scala3/reference/changed-features/pattern-matching
6+
next-page: /scala3/reference/changed-features/compiler-plugins
57
---
68

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

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

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: doc-page
2+
layout: singlepage-overview
3+
scala3: true
34
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.md) between Scala 2 and Scala 3.
85+
Note that implicit conversions are also affected by the [changes to implicit resolution](implicit-resolution.html) 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.md) for more information.
112+
changes to implicit resolution, refer to the [Changes in Implicit Resolution](implicit-resolution.html) for more information.
113113

114114
## Reference
115115

116-
For more information about implicit resolution, see [Changes in Implicit Resolution](implicit-resolution.md).
116+
For more information about implicit resolution, see [Changes in Implicit Resolution](implicit-resolution.html).
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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
layout: doc-page
32
title: "Implicit Conversions"
4-
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/implicit-conversions.html
3+
type: section
4+
num: 60
5+
previous-page: /scala3/reference/changed-features/implicit-resolution
6+
next-page: /scala3/reference/changed-features/overload-resolution
57
---
68

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

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

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
---
2-
layout: doc-page
32
title: "Changes in Implicit Resolution"
4-
movedTo: https://docs.scala-lang.org/scala3/reference/changed-features/implicit-resolution.html
3+
type: section
4+
num: 59
5+
previous-page: /scala3/reference/changed-features/type-inference
6+
next-page: /scala3/reference/changed-features/implicit-conversions
57
---
8+
69
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.
710
Implicit resolution uses a new algorithm which caches implicit results
811
more aggressively for performance. There are also some changes that

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

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

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

0 commit comments

Comments
 (0)