Skip to content

Commit b100d2b

Browse files
authored
Backport "minor improvements to developer docs for Scaladoc tool" to LTS (#19066)
Backports #16769 to the LTS branch. PR submitted by the release tooling. [skip ci]
2 parents 55860de + f58cdd7 commit b100d2b

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

docs/_docs/contributing/scaladoc.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: doc-page
33
title: Scaladoc
44
---
55

6-
Scaladoc is the documentation tool for [Scala
6+
Scaladoc is the documentation tool for [Scala
77
3](https://github.com/lampepfl/dotty). It uses the TastyInspector to access
88
definitions, which is an officially supported way to access Scala 3's
99
perspective of a codebase.
@@ -62,11 +62,20 @@ You can also find the result of building the same sites for latest `master` at:
6262
- <https://scala3doc.virtuslab.com/master/scala3/main/index.html>
6363
- <https://scala3doc.virtuslab.com/master/testcases/main/index.html>
6464

65+
You can run the Scaladoc tool from the sbt prompt as a user would run it
66+
with `scaladoc/run`, passing `-d <directory>` and some `.tasty` files as
67+
input on the command line.
68+
6569
### Testing
6670

71+
From the sbt prompt, `scaladoc/test` runs the tests.
72+
73+
You can also run specific signature tests with `testOnly`,
74+
for example `scaladoc/test *scaladoc.signatures.MarkdownCode`.
75+
6776
Most tests rely on comparing signatures (of classes, methods, objects etc.) extracted from the generated documentation
68-
to signatures found in source files. Such tests are defined using [SignatureTest](test/dotty/tools/scaladoc/signatures/SignatureTest.scala) class
69-
and its subtypes (such as [TranslatableSignaturesTestCases](test/dotty/tools/scaladoc/signatures/TranslatableSignaturesTestCases.scala))
77+
to signatures found in source files (extracted using Scalameta). Such tests are defined using [SignatureTest](test/dotty/tools/scaladoc/signatures/SignatureTest.scala) class
78+
and its subtypes (such as [TranslatableSignaturesTestCases](test/dotty/tools/scaladoc/signatures/TranslatableSignaturesTestCases.scala)). In this style of test, it's not necessary for expected output to be included, because the test is its own specification.
7079

7180
WARNING: As the classes mentioned above are likely to evolve, the description below might easily get out of date.
7281
In case of any discrepancies rely on the source files instead.
@@ -121,25 +130,8 @@ class Bar
121130

122131
Otherwise the implementation would be treated as a part of the signature.
123132

124-
## Contributing
125-
126-
We're happy that you'd like to help us!
127-
128-
We have two issue labels you should take a look at: `good first issue` and
129-
`self-contained`. First is easy pickings: you'll be able to contribute without
130-
needing to dive too deep into the project. Second is reverse: it's an issue
131-
that's you may find interesting, complex and self-contained enough that you can
132-
continue chipping away at it without needing to worry too much about merge
133-
conflicts.
134-
135-
To contribute to the project with your code, fork this repo and create a pull request from a fresh branch from there.
136-
To keep the history of commits clean, make sure your commits are squashed into one
137-
and all your changes are applied on top of the latest master branch (if not - rebase on it instead of merging it).
138-
Make sure all the tests pass (simply run `sbt test` to verify that).
139-
140133
## FAQ
141134

142-
143135
### Why use TASTy?
144136

145137
A documentation tool needs to access compiler information about the project - it

docs/_docs/contributing/sending-in-a-pr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ Request](https://help.github.com/articles/using-pull-requests) on GitHub.
139139
If you're not actually finished yet and are just looking for some initial input
140140
on your approach, feel free to open a [Draft PR][draft]. This lets reviewers
141141
know that you're not finished yet. It's also a good idea to put a [wip] in front
142-
of your pr title to make this extra clear.
142+
of your PR title to make this extra clear.
143143

144144
Shortly after creating your pull request a maintainer should assign someone to
145145
review it. If this doesn't happen after a few days, feel free to ping someone on
146-
the [Scala Contributors Discor][discord] or tag someone on the PR. Depending on
146+
the [Scala Contributors Discord][discord] or tag someone on the PR. Depending on
147147
the type of pull request there might be multiple people that take a look at your
148148
changes. There might also be community input as we try to keep the review
149149
process as open as possible.

docs/_docs/contributing/testing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ sbt:scala3> scala3-compiler/Test/runMain
200200

201201
then compare the changes via version control.
202202

203+
### Scaladoc tests
204+
205+
See the [Scaladoc contributors guide](./scaladoc.md).
206+
203207
## Troubleshooting
204208

205209
Some of the tests depend on temporary state stored in the `out` directory. In rare cases, that directory

0 commit comments

Comments
 (0)