Skip to content

Commit 8e9ac75

Browse files
authored
Merge pull request #10144 from dotty-staging/fix-whitespace-scala3doc
fix #10138: trim trailing whitespace
2 parents 0946121 + 0dbb16e commit 8e9ac75

Some content is hidden

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

52 files changed

+358
-358
lines changed

scala3doc/dotty-docs/docs/_layouts/base.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
window.scrollTo(0, $(window.location.hash).offset().top - 90);
2929
}
3030
})
31-
</script>
31+
</script>

scala3doc/dotty-docs/docs/blog/_posts/2019-01-21-12th-dotty-milestone-release.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,4 @@ to make sure that our regression suite includes your library.
221221
[@Blaisorblade]: https://github.com/Blaisorblade
222222
[@Duhemm]: https://github.com/Duhemm
223223
[@AleksanderBG]: https://github.com/AleksanderBG
224-
[@milessabin]: https://github.com/milessabin
224+
[@milessabin]: https://github.com/milessabin

scala3doc/dotty-docs/docs/docs/contributing/contribute-knowledge.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ If you know anything useful at all about Dotty, feel free to log this knowledge:
99
- [📜Log the Knowledge](https://github.com/lampepfl/dotty-knowledge/issues/new)
1010
- [🎓More about Logging the Knowledge](https://github.com/lampepfl/dotty-knowledge/blob/master/README.md)
1111

12-
In short, no need to make it pretty, particularly human-readable or give it a particular structure. Just dump the knowledge you have and we'll take it from there.
12+
In short, no need to make it pretty, particularly human-readable or give it a particular structure. Just dump the knowledge you have and we'll take it from there.

scala3doc/dotty-docs/docs/docs/contributing/procedures/release.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,4 @@ git checkout master
152152

153153
git commit -am 'Set baseVersion to 0.16.0'
154154
git push origin master
155-
```
155+
```

scala3doc/dotty-docs/docs/docs/contributing/testing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Running all tests in Dotty is as simple as:
99
$ sbt test
1010
```
1111

12-
Specifically, `sbt test` runs all tests that do _not_ require a bootstrapped
13-
compiler. In practice, this means that it runs all compilation tests meeting
14-
this criterion, as well as all non-compiler tests.
12+
Specifically, `sbt test` runs all tests that do _not_ require a bootstrapped
13+
compiler. In practice, this means that it runs all compilation tests meeting
14+
this criterion, as well as all non-compiler tests.
1515

1616
The entire suite of tests can be run using the bootstrapped compiler as follows:
1717

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,4 @@ def foo(f: Foo) = f match {
240240
```
241241

242242
There are plans for further simplification, in particular to factor out *product
243-
match* and *name-based match* into a single type of extractor.
243+
match* and *name-based match* into a single type of extractor.

scala3doc/dotty-docs/docs/docs/reference/contextual/extension-methods.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def extension_position(s: String)(ch: Char, n: Int): Int =
259259
extension (x: Double) def ** (exponent: Int): Double =
260260
require(exponent >= 0)
261261
if exponent == 0 then 1 else x * (x ** (exponent - 1))
262-
262+
263263
import DoubleOps.{**, extension_**}
264264
assert(2.0 ** 3 == extension_**(2.0)(3))
265265
```

scala3doc/dotty-docs/docs/docs/reference/dropped-features/macros.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: doc-page
33
title: Dropped: Scala 2 Macros
44
---
55

6-
The previous, experimental macro system has been dropped. Instead, there is a cleaner, more restricted system based on two complementary concepts: `inline` and `'{ ... }`/`${ ... }` code generation.
6+
The previous, experimental macro system has been dropped. Instead, there is a cleaner, more restricted system based on two complementary concepts: `inline` and `'{ ... }`/`${ ... }` code generation.
77
`'{ ... }` delays the compilation of the code and produces an object containing the code, dually `${ ... }` evaluates an expression which produces code and inserts it in the surrounding `${ ... }`.
88
In this setting, a definition marked as inlined containing a `${ ... }` is a macro, the code inside the `${ ... }` is executed at compile-time and produces code in the form of `'{ ... }`.
99
Additionally, the contents of code can be inspected and created with a more complex reflection API (TASTy Reflect) as an extension of `'{ ... }`/`${ ... }` framework.

scala3doc/dotty-docs/docs/docs/reference/features-classification.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@ Some existing programs will break and, given the complex nature of type inferenc
199199

200200
In our experience, macros and changes in type and implicit argument inference together cause the large majority of problems encountered when porting existing code to Scala 3. The latter source of problems could be addressed systematically by a tool that added all inferred types and implicit arguments to a Scala 2 source code file. Most likely such a tool would be implemented as a Scala 2 compiler plugin. The resulting code would have a greatly increased likelihood to compile under Scala 3, but would often be bulky to the point of being unreadable. A second part of the rewriting tool should then selectively and iteratively remove type and implicit annotations that were synthesized by the first part as long as they compile under Scala 3. This second part could be implemented as a program that invokes the Scala 3 compiler `dotc` programmatically.
201201

202-
Several people have proposed such a tool for some time now. I believe it is time we find the will and the resources to actually implement it.
202+
Several people have proposed such a tool for some time now. I believe it is time we find the will and the resources to actually implement it.

scala3doc/dotty-docs/docs/docs/reference/metaprogramming/inline.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@ val obj2 = choose(false) // static type is B
268268
// obj1.m() // compile-time error: `m` is not defined on `A`
269269
obj2.m() // OK
270270
```
271-
Here, the inline method `choose` returns an instance of either of the two types `A` or `B`.
271+
Here, the inline method `choose` returns an instance of either of the two types `A` or `B`.
272272
If `choose` had not been declared to be `transparent`, the result
273-
of its expansion would always be of type `A`, even though the computed value might be of the subtype `B`.
274-
The inline method is a "blackbox" in the sense that details of its implementation do not leak out.
273+
of its expansion would always be of type `A`, even though the computed value might be of the subtype `B`.
274+
The inline method is a "blackbox" in the sense that details of its implementation do not leak out.
275275
But if a `transparent` modifier is given, the expansion is the type of the expanded body. If the argument `b`
276276
is `true`, that type is `A`, otherwise it is `B`. Consequently, calling `m` on `obj2`
277277
type-checks since `obj2` has the same type as the expansion of `choose(false)`, which is `B`.

scala3doc/dotty-docs/docs/docs/reference/new-types/union-types-spec.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def test(x: A | B) = x.hello // error: value `hello` is not a member of A | B
130130
On the otherhand, the following would be allowed
131131
```scala
132132
trait C { def hello: String }
133-
trait A extends C with D
133+
trait A extends C with D
134134
trait B extends C with E
135135

136136
def test(x: A | B) = x.hello // ok as `hello` is a member of the join of A | B which is C

scala3doc/dotty-docs/docs/docs/reference/other-new-features/named-typeargs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ val xs2 = construct[Coll = List](1, 2, 3)
1616

1717
Similar to a named value argument `(x = e)`, a named type argument
1818
`[X = T]` instantiates the type parameter `X` to the type `T`.
19-
Named type arguments do not have to be in order (see `xs1` above) and
19+
Named type arguments do not have to be in order (see `xs1` above) and
2020
unspecified arguments are inferred by the compiler (see `xs2` above).
2121
Type arguments must be all named or un-named, mixtures of named and
2222
positional type arguments are not supported.

scala3doc/dotty-docs/docs/docs/reference/soft-modifier.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ title: Soft Modifiers
44
---
55

66
A soft modifier is one of the identifiers `opaque` and `inline`.
7-
<!--
8-
TODO this is most likely outdated should at least contain `extension` in addition.
9-
Worth maintaining? or maybe better refer to internal/syntax.md ?
7+
<!--
8+
TODO this is most likely outdated should at least contain `extension` in addition.
9+
Worth maintaining? or maybe better refer to internal/syntax.md ?
1010
-->
1111

1212
It is treated as a potential modifier of a definition, if it is followed by a hard modifier or a keyword combination starting a definition (`def`, `val`, `var`, `type`, `class`, `case class`, `trait`, `object`, `case object`, `enum`). Between the two words there may be a sequence of newline tokens and soft modifiers.

scala3doc/dotty-docs/docs/docs/resources/talks.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Talks on Dotty
1111

1212
- (JVMLS 2015) [Compilers are Databases](https://www.youtube.com/watch?v=WxyyJyB_Ssc) by [Martin Odersky](http://twitter.com/odersky) [\[slides\]](http://www.slideshare.net/Odersky/compilers-are-databases)
1313

14-
- (Scala World 2015) [Dotty: Exploring the future of Scala](https://www.youtube.com/watch?v=aftdOFuVU1o) by [Dmitry Petrashko](http://twitter.com/darkdimius) [\[slides\]](https://d-d.me/scalaworld2015/#/).
15-
Dmitry covers many of the new features that Dotty brings on the table such as Intersection and Union types, improved lazy val initialization and more.
16-
Dmitry also covers dotty internals and in particular the high-level of contextual abstractions of Dotty. You will get to
17-
become familiar with many core concepts such as `Denotations`, their evolution through (compilation) time, their
14+
- (Scala World 2015) [Dotty: Exploring the future of Scala](https://www.youtube.com/watch?v=aftdOFuVU1o) by [Dmitry Petrashko](http://twitter.com/darkdimius) [\[slides\]](https://d-d.me/scalaworld2015/#/).
15+
Dmitry covers many of the new features that Dotty brings on the table such as Intersection and Union types, improved lazy val initialization and more.
16+
Dmitry also covers dotty internals and in particular the high-level of contextual abstractions of Dotty. You will get to
17+
become familiar with many core concepts such as `Denotations`, their evolution through (compilation) time, their
1818
transformations and more.
1919

2020
Deep Dive with Dotty
@@ -23,7 +23,7 @@ Deep Dive with Dotty
2323

2424
- (ScalaDays 2019, Lausanne) [Future-proofing Scala: the TASTY intermediate representation](https://www.youtube.com/watch?v=zQFjC3zLYwo) by [Guillaume Martres](http://guillaume.martres.me/).
2525

26-
- (Mar 21, 2017) [Dotty Internals 1: Trees & Symbols](https://www.youtube.com/watch?v=yYd-zuDd3S8) by [Dmitry Petrashko](http://twitter.com/darkdimius) [\[meeting notes\]](../internals/dotty-internals-1-notes.md).
26+
- (Mar 21, 2017) [Dotty Internals 1: Trees & Symbols](https://www.youtube.com/watch?v=yYd-zuDd3S8) by [Dmitry Petrashko](http://twitter.com/darkdimius) [\[meeting notes\]](../internals/dotty-internals-1-notes.md).
2727
This is a recorded meeting between EPFL and Waterloo, where we introduce first notions inside Dotty: Trees and Symbols.
2828

2929
- (Mar 21, 2017) [Dotty Internals 2: Types](https://www.youtube.com/watch?v=3gmLIYlGbKc) by [Martin Odersky](http://twitter.com/odersky) and [Dmitry Petrashko](http://twitter.com/darkdimius).
@@ -36,26 +36,26 @@ This is a recorded meeting between EPFL and Waterloo, where we introduce denotat
3636
[Dmitry Petrashko](http://twitter.com/darkdimius) gives a high-level introduction on what was done to make Dotty .
3737

3838

39-
- (Typelevel Summit Oslo, May 2016) [Dotty and types: the story so far](https://www.youtube.com/watch?v=YIQjfCKDR5A) by
39+
- (Typelevel Summit Oslo, May 2016) [Dotty and types: the story so far](https://www.youtube.com/watch?v=YIQjfCKDR5A) by
4040
Guillaume Martres [\[slides\]](http://guillaume.martres.me/talks/typelevel-summit-oslo/).
41-
Guillaume focused on some of the practical improvements to the type system that Dotty makes, like the new type parameter
41+
Guillaume focused on some of the practical improvements to the type system that Dotty makes, like the new type parameter
4242
inference algorithm that is able to reason about the type safety of more situations than scalac.
4343

44-
- (flatMap(Oslo) 2016) [AutoSpecialization in Dotty](https://vimeo.com/165928176) by [Dmitry Petrashko](http://twitter.com/darkdimius) [\[slides\]](https://d-d.me/talks/flatmap2016/#/).
45-
The Dotty Linker analyses your program and its dependencies to
46-
apply a new specialization scheme. It builds on our experience from Specialization, Miniboxing and the Valhalla Project,
47-
and drastically reduces the size of the emitted bytecode. And, best of all, it's always enabled, happens behind the
44+
- (flatMap(Oslo) 2016) [AutoSpecialization in Dotty](https://vimeo.com/165928176) by [Dmitry Petrashko](http://twitter.com/darkdimius) [\[slides\]](https://d-d.me/talks/flatmap2016/#/).
45+
The Dotty Linker analyses your program and its dependencies to
46+
apply a new specialization scheme. It builds on our experience from Specialization, Miniboxing and the Valhalla Project,
47+
and drastically reduces the size of the emitted bytecode. And, best of all, it's always enabled, happens behind the
4848
scenes without annotations, and results in speedups in excess of 20x. Additionally, it "just works" on Scala collections.
4949

5050
- (ScalaSphere 2016) [Hacking on Dotty: A live demo](https://www.youtube.com/watch?v=0OOYGeZLHs4) by Guillaume Martres [\[slides\]](http://guillaume.martres.me/talks/dotty-live-demo/).
51-
Guillaume hacks on Dotty: a live demo during which he
51+
Guillaume hacks on Dotty: a live demo during which he
5252
creates a simple compiler phase to trace method calls at run-time.
5353

54-
- (Scala By the Bay 2016) [Dotty: what is it and how it works](https://www.youtube.com/watch?v=wCFbYu7xEJA) by Guillaume
55-
Martres [\[slides\]](http://guillaume.martres.me/talks/dotty-tutorial/#/). Guillaume provides a high-level view of the
54+
- (Scala By the Bay 2016) [Dotty: what is it and how it works](https://www.youtube.com/watch?v=wCFbYu7xEJA) by Guillaume
55+
Martres [\[slides\]](http://guillaume.martres.me/talks/dotty-tutorial/#/). Guillaume provides a high-level view of the
5656
compilation-pipeline of Dotty.
5757

58-
- (ScalaDays 2015, Amsterdam) [Making your Scala applications smaller and faster with the Dotty linker](https://www.youtube.com/watch?v=xCeI1ArdXM4) by Dmitry Petrashko [\[slides\]](https://d-d.me/scaladays2015/#/).
59-
Dmitry introduces the call-graph analysis algorithm
60-
that Dotty implements and the performance benefits we can get in terms of number of methods, bytecode size, JVM code size
58+
- (ScalaDays 2015, Amsterdam) [Making your Scala applications smaller and faster with the Dotty linker](https://www.youtube.com/watch?v=xCeI1ArdXM4) by Dmitry Petrashko [\[slides\]](https://d-d.me/scaladays2015/#/).
59+
Dmitry introduces the call-graph analysis algorithm
60+
that Dotty implements and the performance benefits we can get in terms of number of methods, bytecode size, JVM code size
6161
and the number of objects allocated in the end.

scala3doc/dotty-docs/docs/js/bootstrap.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scala3doc/dotty-docs/docs/js/highlight.pack.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scala3doc/resources/dotty_res/hljs/highlight.pack.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scala3doc/resources/dotty_res/scripts/components/DocumentableList.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ class DocumentableList extends Component {
6868
}
6969
}
7070

71-
class List {
72-
filterTab(name) {
71+
class List {
72+
filterTab(name) {
7373
return name !== "Linear supertypes" && name !== "Known subtypes" && name !== "Type hierarchy"
7474
}
7575

scala3doc/resources/dotty_res/scripts/diagram.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ $("#inheritance-diagram").ready(function() {
44
if (dotNode){
55
var svg = d3.select("#graph");
66
var inner = svg.append("g");
7-
7+
88
// Set up zoom support
99
var zoom = d3.zoom()
1010
.on("zoom", function({transform}) {
1111
inner.attr("transform", transform);
1212
});
1313
svg.call(zoom);
14-
14+
1515
var render = new dagreD3.render();
1616
var g = graphlibDot.read(dotNode.text);
1717
g.graph().rankDir = 'BT';
1818
g.nodes().forEach(function (v) {
19-
g.setNode(v, {
19+
g.setNode(v, {
2020
labelType: "html",
2121
label: g.node(v).label,
2222
style: g.node(v).style

scala3doc/src/dotty/dokka/DottyDokkaConfig.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ case class DottyDokkaConfig(docConfiguration: DocConfiguration) extends DokkaCon
2525

2626
override def getPluginsConfiguration: JList[DokkaConfiguration.PluginConfiguration] = List(OurConfig).asJava
2727

28-
def mkSourceSet: DokkaConfiguration.DokkaSourceSet =
28+
def mkSourceSet: DokkaConfiguration.DokkaSourceSet =
2929
val sourceLinks:Set[SourceLinkDefinitionImpl] = docConfiguration.args.sourceLinks.map(SourceLinkDefinitionImpl.Companion.parseSourceLinkDefinition(_)).toSet
3030
new DokkaSourceSetImpl(
3131
/*displayName=*/ docConfiguration.args.name,

scala3doc/src/dotty/dokka/DottyDokkaPlugin.scala

+12-12
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ class DottyDokkaPlugin extends DokkaJavaPlugin:
4444
_.extensionPoint(CoreExtensions.INSTANCE.getSourceToDocumentableTranslator)
4545
.fromInstance(EmptyModuleProvider)
4646
.overrideExtension(dokkaBase.getPsiToDocumentableTranslator)
47-
)
47+
)
4848

49-
// Just turn off another translator since multiple overrides does not work
49+
// Just turn off another translator since multiple overrides does not work
5050
val disableDescriptorTranslator = extend(
5151
_.extensionPoint(CoreExtensions.INSTANCE.getSourceToDocumentableTranslator)
5252
.fromInstance(ScalaModuleProvider)
5353
.overrideExtension(dokkaBase.getDescriptorToDocumentableTranslator)
5454
.name("disableDescriptorTranslator")
55-
)
55+
)
5656

5757
// Clean up empty module provided in disableDescriptorTranslator
5858
val cleanUpEmptyModules = extend(
@@ -65,20 +65,20 @@ class DottyDokkaPlugin extends DokkaJavaPlugin:
6565
.fromRecipe(ctx =>
6666
new ScalaSignatureProvider(ctx.single(dokkaBase.getCommentsToContentConverter), ctx.getLogger)
6767
).overrideExtension(dokkaBase.getKotlinSignatureProvider)
68-
)
68+
)
6969

7070
val scalaResourceInstaller = extend(
7171
_.extensionPoint(dokkaBase.getHtmlPreprocessors)
7272
.fromInstance(new ScalaResourceInstaller())
7373
.after(dokkaBase.getCustomResourceInstaller)
74-
)
74+
)
7575

7676
val scalaEmbeddedResourceAppender = extend(
7777
_.extensionPoint(dokkaBase.getHtmlPreprocessors)
7878
.fromInstance(new ScalaEmbeddedResourceAppender())
7979
.after(dokkaBase.getCustomResourceInstaller)
8080
.name("scalaEmbeddedResourceAppender")
81-
)
81+
)
8282

8383
val scalaDocumentableToPageTranslator = extend(
8484
_.extensionPoint(CoreExtensions.INSTANCE.getDocumentableToPageTranslator)
@@ -88,19 +88,19 @@ class DottyDokkaPlugin extends DokkaJavaPlugin:
8888
ctx.getLogger
8989
))
9090
.overrideExtension(dokkaBase.getDocumentableToPageTranslator)
91-
)
91+
)
9292

9393
val packageHierarchyTransformer = extend(
9494
_.extensionPoint(CoreExtensions.INSTANCE.getPageTransformer)
9595
.fromRecipe(PackageHierarchyTransformer(_))
9696
.before(dokkaBase.getRootCreator)
97-
)
97+
)
9898

9999
val inheritanceTransformer = extend(
100100
_.extensionPoint(CoreExtensions.INSTANCE.getDocumentableTransformer)
101101
.fromRecipe(InheritanceInformationTransformer(_))
102102
.name("inheritanceTransformer")
103-
)
103+
)
104104

105105
val ourSourceLinksTransformer = extend(
106106
_.extensionPoint(CoreExtensions.INSTANCE.getDocumentableTransformer)
@@ -123,7 +123,7 @@ class DottyDokkaPlugin extends DokkaJavaPlugin:
123123
_.extensionPoint(dokkaBase.getCommentsToContentConverter)
124124
.fromInstance(ScalaCommentToContentConverter)
125125
.overrideExtension(dokkaBase.getDocTagToContentConverter)
126-
)
126+
)
127127

128128
val implicitMembersExtensionTransformer = extend(
129129
_.extensionPoint(CoreExtensions.INSTANCE.getDocumentableTransformer )
@@ -138,12 +138,12 @@ class DottyDokkaPlugin extends DokkaJavaPlugin:
138138
})
139139
.overrideExtension(dokkaBase.getSourceLinksTransformer)
140140
.name("muteDefaultSourceLinksTransformer")
141-
)
141+
)
142142

143143
// TODO remove once problem is fixed in Dokka
144144
extension [T] (builder: ExtensionBuilder[T]):
145145
def before(exts: Extension[_, _, _]*): ExtensionBuilder[T] =
146146
(new ExtensionBuilderEx).newOrdering(builder, exts.toArray, Array.empty)
147147

148148
def after(exts: Extension[_, _, _]*): ExtensionBuilder[T] =
149-
(new ExtensionBuilderEx).newOrdering(builder, Array.empty, exts.toArray)
149+
(new ExtensionBuilderEx).newOrdering(builder, Array.empty, exts.toArray)

scala3doc/src/dotty/dokka/IO.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ public FileVisitResult visitFile(
2525
}
2626
});
2727
}
28-
}
28+
}

scala3doc/src/dotty/dokka/ScalaModuleCreator.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ object ScalaModuleProvider extends JavaSourceToDocumentableTranslator:
5353

5454
object EmptyModuleProvider extends JavaSourceToDocumentableTranslator:
5555
override def process(sourceSet: DokkaSourceSet, context: DokkaContext) =
56-
DModule("", Nil.asJava, Map.empty.asJava, null, Set(sourceSet).asJava, PropertyContainer.Companion.empty())
56+
DModule("", Nil.asJava, Map.empty.asJava, null, Set(sourceSet).asJava, PropertyContainer.Companion.empty())

0 commit comments

Comments
 (0)