Skip to content

Remove source files in _scala3-reference/ #2391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ collections:
getting-started:
output: true
permalink: /:collection/:path.html
scala3-reference: # not really a collection, but this is the only way I found to be able to generate the navigation bar on the right
output: true
ja: # Japanese translations
output: true
permalink: /:collection/:path.html
Expand Down Expand Up @@ -152,16 +150,6 @@ defaults:
overview-name: "Scaladoc"
layout: multipage-overview
permalink: "/scala3/guides/scaladoc/:title.html"
-
scope:
path: "_scala3-reference"
values:
scala3: true
partof: scala3-reference
type: section
overview-name: "Scala 3 Language Reference"
layout: multipage-overview
permalink: "/scala3/reference/:path.html"
-
scope:
path: "scala3"
Expand All @@ -172,7 +160,7 @@ defaults:
highlighter: rouge
permalink: /:categories/:title.html:output_ext
baseurl:
scala3ref: "/scala3/reference"
scala3ref: "https://docs.scala-lang.org/scala3/reference"
exclude: ["vendor"]
plugins:
- jekyll-redirect-from
Expand Down
2 changes: 1 addition & 1 deletion _data/scala3-doc-nav-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- title: Guides
url: '/scala3/guides.html'
- title: Language Specification
url: "/scala3/reference/overview.html"
url: "https://docs.scala-lang.org/scala3/reference"
- title: Scala Library API
url: "https://scala-lang.org/api/3.x/"
- title: Contributing Guide
Expand Down
2 changes: 1 addition & 1 deletion _ja/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ scala3-sections:
- title: "Language Reference"
description: "Scala 3 の言語仕様"
icon: "fa fa-book"
link: /scala3/reference/overview.html
link: https://docs.scala-lang.org/scala3/reference

scala2-sections:

Expand Down
4 changes: 2 additions & 2 deletions _ja/scala3/contribute-to-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ Scala 3 コンパイラとライブラリへの貢献と内部に関する包括
- [Issues](https://github.com/scala/docs.scala-lang/issues)

## Scala 3 Language Reference
The [Dotty reference](/scala3/reference/overview.html) は Scala 3 になる予定である。これにはさまざまな言語仕様に関する公式のプレゼンテーションや技術的情報が含まれている。
The [Dotty reference]({{ site.scala3ref }}/overview.html) は Scala 3 になる予定である。これにはさまざまな言語仕様に関する公式のプレゼンテーションや技術的情報が含まれている。

- [Sources](https://github.com/lampepfl/dotty/tree/master/docs/docs/reference)
- [Sources](https://github.com/lampepfl/dotty/tree/main/docs/_docs)
- [Issues](https://github.com/lampepfl/dotty/issues)


Expand Down
2 changes: 1 addition & 1 deletion _ja/scala3/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ sections:
- title: "Language Reference"
description: "Scala 3 の言語仕様"
icon: "fa fa-book"
link: /scala3/reference/overview.html
link: https://docs.scala-lang.org/scala3/reference
---
4 changes: 2 additions & 2 deletions _ja/scala3/new-in-scala3.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Scala 3 のメタプログラミングについてもっと知りたいかたは
[migration]: {% link _overviews/scala3-migration/compatibility-intro.md %}
[contribution]: {% link _overviews/scala3-contribution/contribution-intro.md %}

[implicits]: {{ site.scala3ref }}/contextual.html
[implicits]: {{ site.scala3ref }}/contextual
[contextual-using]: {{ site.scala3ref }}/contextual/using-clauses.html
[contextual-givens]: {{ site.scala3ref }}/contextual/givens.html
[contextual-extension]: {{ site.scala3ref }}/contextual/extension-methods.html
Expand All @@ -120,7 +120,7 @@ Scala 3 のメタプログラミングについてもっと知りたいかたは
[meta-quotes]: {% link _overviews/scala3-macros/tutorial/quotes.md %}
[meta-reflection]: {% link _overviews/scala3-macros/tutorial/reflection.md %}

[oo-explicit-null]: {{ site.scala3ref }}/other-new-features/explicit-nulls.html
[oo-explicit-null]: {{ site.scala3ref }}/experimental/explicit-nulls.html
[oo-safe-init]: {{ site.scala3ref }}/other-new-features/safe-initialization.html
[oo-trait-parameters]: {{ site.scala3ref }}/other-new-features/trait-parameters.html
[oo-open]: {{ site.scala3ref }}/other-new-features/open-classes.html
Expand Down
4 changes: 2 additions & 2 deletions _overviews/FAQ/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ and a [summary with practical differences](https://tpolecat.github.io/2014/06/09

Note that in **Scala 3** the differences are fewer;
for example, they will be able to
[accept implicit parameters](/scala3/reference/contextual/context-functions.html)
as well as [type parameters](/scala3/reference/new-types/polymorphic-function-types.html).
[accept implicit parameters]({{ site.scala3ref }}/contextual/context-functions.html)
as well as [type parameters]({{ site.scala3ref }}/new-types/polymorphic-function-types.html).

Nevertheless, it is still recommended to use methods most of the time,
unless you absolutely need a function. And, thanks to
Expand Down
2 changes: 1 addition & 1 deletion _overviews/contribute/add-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,4 @@ above. Here is an example using the various modifiers.
[why-contribute]: {% link contribute.md %}
[home]: {% link index.md %}
[overviews-index]: {% link _overviews/index.md %}
[scala-3-reference]: https://docs.scala-lang.org/scala3/reference/overview.html
[scala-3-reference]: {{ site.scala3ref }}
2 changes: 1 addition & 1 deletion _overviews/scala3-book/ca-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ A few more advanced topics aren’t covered here, including:
Those topics are discussed in detail in the [Reference documentation][ref].


[ref]: {{ site.scala3ref }}/contextual.html
[ref]: {{ site.scala3ref }}/contextual
2 changes: 1 addition & 1 deletion _overviews/scala3-book/first-look-at-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,4 @@ Alternatives to `null` are discussed in the [Functional Programming chapter][fp]
[interpolation]: {% link _overviews/core/string-interpolation.md %}
[fp]: {% link _overviews/scala3-book/fp-intro.md %}
[option-api]: https://scala-lang.org/api/3.x/scala/Option.html
[safe-null]: {{ site.scala3ref }}/other-new-features/explicit-nulls.html
[safe-null]: {{ site.scala3ref }}/experimental/explicit-nulls.html
4 changes: 2 additions & 2 deletions _overviews/scala3-book/scala-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ As Heather Miller states, Scala is considered to be a [strong, statically-typed
- You can refactor your code with confidence
- Method type declarations tell readers what the method does, and help serve as documentation
- Scalability and maintainability: types help ensure correctness across arbitrarily large applications and development teams
- Strong typing in combination with excellent inference enables mechanisms like [contextual abstraction]({{ site.scala3ref }}/contextual.html) that allows you to omit boilerplate code. Often, this boilerplate code can be inferred by the compiler, based on type definitions and a given context.
- Strong typing in combination with excellent inference enables mechanisms like [contextual abstraction]({{ site.scala3ref }}/contextual) that allows you to omit boilerplate code. Often, this boilerplate code can be inferred by the compiler, based on type definitions and a given context.

{% comment %}
In that list:
Expand Down Expand Up @@ -242,7 +242,7 @@ In Scala, a context parameter directly leads to an inferred argument term that c
Use cases for this concept include implementing [type classes]({% link _overviews/scala3-book/ca-type-classes.md %}), establishing context, dependency injection, expressing capabilities, computing new types, and proving relationships between them.

Scala 3 makes this process more clear than ever before.
Read about contextual abstractions in the [Reference documentation]({{ site.scala3ref }}/contextual.html).
Read about contextual abstractions in the [Reference documentation]({{ site.scala3ref }}/contextual).


### Client & server
Expand Down
8 changes: 4 additions & 4 deletions _overviews/scala3-book/why-scala-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,10 @@ Hopefully you’ll discover more great Scala features as you use the language.
[java]: {% link _overviews/scala3-book/interacting-with-java.md %}
[given]: {% link _overviews/scala3-book/ca-given-using-clauses.md %}
[contextual]: {% link _overviews/scala3-book/ca-contextual-abstractions-intro.md %}
[reference]: {{ site.scala3ref }}/overview.html
[dropped]: https://docs.scala-lang.org/scala3/reference/dropped-features.html
[changed]: https://docs.scala-lang.org/scala3/reference/changed-features.html
[added]: https://docs.scala-lang.org/scala3/reference/other-new-features.html
[reference]: {{ site.scala3ref }}
[dropped]: {{ site.scala3ref }}/dropped-features
[changed]: {{ site.scala3ref }}/changed-features
[added]:{{ site.scala3ref }}/other-new-features

[union-types]: {% link _overviews/scala3-book/types-union.md %}
[opaque-types]: {% link _overviews/scala3-book/types-opaque-types.md %}
2 changes: 1 addition & 1 deletion _overviews/scala3-contribution/arch-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ tools // contains helpers and the `scala` generic runner
[dotty.tools]: https://github.com/lampepfl/dotty/tree/master/compiler/src/dotty/tools
[ScalaSettings]: https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
[phase-categories]: {% link _overviews/scala3-contribution/arch-phases.md %}#phase-categories
[syntax]: {% link _scala3-reference/syntax.md %}
[syntax]: {{ site.scala3ref }}/syntax.html
[Main]: https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/Main.scala
[Driver]: https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/Driver.scala
[Compiler]: https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/Compiler.scala
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-contribution/arch-phases.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ These map the transformed trees to Java classfiles or SJSIR files.
[patternMatcher]: https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala
[erasure]: https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/transform/Erasure.scala
[Mirror]: https://github.com/lampepfl/dotty/blob/master/library/src/scala/deriving/Mirror.scala
[PCP]: {% link _scala3-reference/metaprogramming/macros.md %}#the-phase-consistency-principle
[PCP]: {{ site.scala3ref }}/metaprogramming/macros.html#the-phase-consistency-principle
2 changes: 1 addition & 1 deletion _overviews/scala3-contribution/contribution-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on [GitHub](https://github.com/scala/docs.scala-lang/tree/main/_overviews/scala3

`dotc` is built with Scala 3, fully utilising its [new features](/scala3/new-in-scala3.html).
It is recommended that you first have some familiarity with Scala 3
to get the most out of this guide. You can learn more in the [language reference](/scala3/reference/overview.html).
to get the most out of this guide. You can learn more in the [language reference]({{ site.scala3ref}}).

Many code snippets in this guide make use of shell commands (a line beginning with `$`), and in this case
a `bash` compatible shell is assumed. You may have to look up how to translate commands to your shell.
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-macros/other-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ num: 9
* [Migration status][migration-status]

## Dotty documentation
- [Dotty Documentation](/scala3/reference/metaprogramming.html)
- [Dotty Documentation]({{ site.scala3ref }}/metaprogramming)
- [Macros: The Plan For Scala 3](https://www.scala-lang.org/blog/2018/04/30/in-a-nutshell.html)
- [Examples](https://github.com/lampepfl/dotty-macro-examples) - a repository with small, self-contained examples of various tasks done with Dotty macros.

Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-macros/tutorial/inline.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def powerCode(x: Expr[Double], n: Expr[Int])(using Quotes): Expr[Double] = ...
```


[soft-modifier]: {% link _scala3-reference/soft-modifier.md %}
[soft-modifier]: {{ site.scala3ref }}/soft-modifier.html

[contributing]: {% link scala3/contribute-to-docs.md %}
[best-practices]: {% link _overviews/scala3-macros/best-practices.md %}
Expand Down
36 changes: 18 additions & 18 deletions _overviews/scala3-migration/compatibility-classpath.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,30 @@ The second piece of good news is that the Scala 2.13 TASTy reader, which enables
### Supported Features

The TASTy reader supports all the traditional language features as well as the following brand-new features:
- [Enumerations]({% link _scala3-reference/enums/enums.md %})
- [Intersection Types]({% link _scala3-reference/new-types/intersection-types.md %})
- [Opaque Type Aliases]({% link _scala3-reference/other-new-features/opaques.md %})
- [Type Lambdas]({% link _scala3-reference/new-types/type-lambdas.md %})
- [Contextual Abstractions]({% link _scala3-reference/contextual.md %}) (new syntax)
- [Open Classes]({% link _scala3-reference/other-new-features/open-classes.md %}) (and inheritance of super traits)
- [Export Clauses]({% link _scala3-reference/other-new-features/export.md %})
- [Enumerations]({{ site.scala3ref }}/enums/enums.html)
- [Intersection Types]({{ site.scala3ref }}/new-types/intersection-types.html)
- [Opaque Type Aliases]({{ site.scala3ref }}/other-new-features/opaques.html)
- [Type Lambdas]({{ site.scala3ref }}/new-types/type-lambdas.html)
- [Contextual Abstractions]({{ site.scala3ref }}/contextual) (new syntax)
- [Open Classes]({{ site.scala3ref }}/other-new-features/open-classes.html) (and inheritance of super traits)
- [Export Clauses]({{ site.scala3ref }}/other-new-features/export.html)

We have limited support on:
- [Top-Level Definitions]({% link _scala3-reference/dropped-features/package-objects.md %})
- [Extension Methods]({% link _scala3-reference/contextual/extension-methods.md %})
- [Top-Level Definitions]({{ site.scala3ref }}/dropped-features/package-objects.html)
- [Extension Methods]({{ site.scala3ref }}/contextual/extension-methods.html)

More exotic features are not supported:
- [Context Functions]({% link _scala3-reference/contextual/context-functions.md %})
- [Polymorphic Function Types]({% link _scala3-reference/new-types/polymorphic-function-types.md %})
- [Trait Parameters]({% link _scala3-reference/other-new-features/trait-parameters.md %})
- [Context Functions]({{ site.scala3ref }}/contextual/context-functions.html)
- [Polymorphic Function Types]({{ site.scala3ref }}/new-types/polymorphic-function-types.html)
- [Trait Parameters]({{ site.scala3ref }}/other-new-features/trait-parameters.html)
- `@static` Annotation
- `@alpha` Annotation
- [Functions and Tuples larger than 22 parameters]({% link _scala3-reference/dropped-features/limit22.md %})
- [Match Types]({% link _scala3-reference/new-types/match-types.md %})
- [Union Types]({% link _scala3-reference/new-types/union-types.md %})
- [Multiversal Equality]({% link _scala3-reference/contextual/multiversal-equality.md %}) (unless explicit)
- [Inline]({% link _scala3-reference/metaprogramming/inline.md %}) (including Scala 3 macros)
- [Kind Polymorphism]({% link _scala3-reference/other-new-features/kind-polymorphism.md %}) (the `scala.AnyKind` upper bound)
- [Functions and Tuples larger than 22 parameters]({{ site.scala3ref }}/dropped-features/limit22.html)
- [Match Types]({{ site.scala3ref }}/new-types/match-types.html)
- [Union Types]({{ site.scala3ref }}/new-types/union-types.html)
- [Multiversal Equality]({{ site.scala3ref }}/contextual/multiversal-equality.html) (unless explicit)
- [Inline]({{ site.scala3ref }}/metaprogramming/inline.html) (including Scala 3 macros)
- [Kind Polymorphism]({{ site.scala3ref }}/other-new-features/kind-polymorphism.html) (the `scala.AnyKind` upper bound)

### A Scala 2.13 module can depend on a Scala 3 artifact

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Before getting deep into reimplementing a macro you should ask yourself:
- Can I use `inline` and the `scala.compiletime` operations to reimplement my logic?
- Can I use the simpler and safer expression based macros?
- Do I really need to access the AST?
- Can I use a [match type](/scala3/reference/new-types/match-types.html) as return type?
- Can I use a [match type]({{ site.scala3ref }}/new-types/match-types.html) as return type?

You can learn all the new metaprogramming concepts by reading the [Macro Tutorial][scala3-macros].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ previous-page: incompat-dropped-features
next-page: incompat-other-changes
---

The redesign of [contextual abstractions]({% link _scala3-reference/contextual.md %}) brings some incompatibilities.
The redesign of [contextual abstractions]({{ site.scala3ref }}/contextual) brings some incompatibilities.

|Incompatibility|Scala 2.13|Scala 3 Migration Rewrite|Scalafix Rule|Runtime Incompatibiltiy|
|--- |--- |--- |--- |--- |
Expand Down
10 changes: 5 additions & 5 deletions _overviews/scala3-migration/incompat-dropped-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You are recommended, as a second step, to replace every use of `Symbol` with a p

## `do`-`while` construct

The `do` keyword has acquired a different meaning in the [New Control Syntax]({% link _scala3-reference/other-new-features/control-syntax.md %}).
The `do` keyword has acquired a different meaning in the [New Control Syntax]({{ site.scala3ref }}/other-new-features/control-syntax.html).

To avoid confusion, the traditional `do <body> while (<cond>)` construct is dropped.
It is recommended to use the equivalent `while ({ <body>; <cond> }) ()` that can be cross-compiled, or the new Scala 3 syntax `while { <body>; <cond> } do ()`.
Expand Down Expand Up @@ -94,11 +94,11 @@ object Hello {
+println(Hello.message())
{% endhighlight %}

Auto-application is covered in detail in [this page](/scala3/reference/dropped-features/auto-apply.html) of the Scala 3 reference documentation.
Auto-application is covered in detail in [this page]({{ site.scala3ref }}/dropped-features/auto-apply.html) of the Scala 3 reference documentation.

## Value eta-expansion

Scala 3 introduces [Automatic Eta-Expansion](/scala3/reference/changed-features/eta-expansion-spec.html) which will deprecate the method to value syntax `m _`.
Scala 3 introduces [Automatic Eta-Expansion]({{ site.scala3ref }}/changed-features/eta-expansion-spec.html) which will deprecate the method to value syntax `m _`.
Furthermore Scala 3 does not allow eta-expansion of values to nullary functions anymore.

Thus, this piece of code is invalid in Scala 3:
Expand Down Expand Up @@ -138,7 +138,7 @@ This rewrite can be applied by the `fix.scala213.Any2StringAdd` Scalafix rule in
## Early Initializer

Early initializers are deprecated in Scala 2.13 and dropped in Scala 3.
They were rarely used, and mostly to compensate for the lack of [Trait parameters](/scala3/reference/other-new-features/trait-parameters.html) which are now supported in Scala 3.
They were rarely used, and mostly to compensate for the lack of [Trait parameters]({{ site.scala3ref }}/other-new-features/trait-parameters.html) which are now supported in Scala 3.

That is why the following piece of code does not compile anymore.

Expand Down Expand Up @@ -198,7 +198,7 @@ class Fizz private (val name: String) extends Bar {

## Existential Type

Existential type is a [dropped feature](/scala3/reference/dropped-features/existential-types.html), which makes the following code invalid.
Existential type is a [dropped feature]({{ site.scala3ref }}/dropped-features/existential-types.html), which makes the following code invalid.

```scala
def foo: List[Class[T]] forSome { type T } // Error: Existential types are no longer supported
Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-migration/incompat-other-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fooCtr.tupled((2, false))
In Scala, case classes have an auto-generated extractor method, called `unapply` in their companion object.
Its signature has changed between Scala 2.13 and Scala 3.

The new signature is option-less (see the new [Pattern Matching](/scala3/reference/changed-features/pattern-matching.html) reference), which causes an incompatibility when `unapply` is called explicitly.
The new signature is option-less (see the new [Pattern Matching]({{ site.scala3ref }}/changed-features/pattern-matching.html) reference), which causes an incompatibility when `unapply` is called explicitly.

Note that this problem does not affect user-defined extractors, whose signature stays the same across Scala versions.

Expand Down
2 changes: 1 addition & 1 deletion _overviews/scala3-migration/incompat-type-inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Child extends Parent {

## Reflective Type

Scala 2 reflective calls are dropped and replaced by the broader [Programmatic Structural Types](/scala3/reference/changed-features/structural-types.html).
Scala 2 reflective calls are dropped and replaced by the broader [Programmatic Structural Types]({{ site.scala3ref }}/changed-features/structural-types.html).

Scala 3 can imitate Scala 2 reflective calls by making `scala.reflect.Selectable.reflectiveSelectable` available wherever `scala.language.reflectiveCalls` is imported.
However the Scala 3 compiler does not infer structural types by default, and thus fails at compiling:
Expand Down
Loading