Skip to content

Tweak doc warnings - #26855

Open
som-snytt wants to merge 1 commit into
scala:mainfrom
som-snytt:tweak/doc-warnings
Open

Tweak doc warnings#26855
som-snytt wants to merge 1 commit into
scala:mainfrom
som-snytt:tweak/doc-warnings

Conversation

@som-snytt

Copy link
Copy Markdown
Contributor

Reduce doc warnings.

* def foo[T](...)(using evidence\$1: A[T]): ...
*
* The "evidence$" prefix is a convention copied from Scala 2.
* The "evid\$" prefix is a convention copied from Scala 2.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidental deletion of a few chars?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Evidently!

@SolalPirelli

Copy link
Copy Markdown
Contributor

Nice initiative. FWIW surrounding stuff in backticks should also work (either inline with a single one or as a block), it used not to but I fixed a bunch of Scaladoc low hanging fruit recently.

@som-snytt

Copy link
Copy Markdown
Contributor Author

@SolalPirelli thanks, I submitted it just to say I would try to do some cleaning. I'm too sick and groggy at the moment to do real coding, but while attempting to look at a bug, I noticed reams of warnings. I thought I was up to adding backslashes. Some warnings were due to inherited vars now warning!

I remember I did add backticks that were missing! in one instance.

I have little love for the doc stack, but appreciate that your eclectic bug fixing includes Scaladoc!

@SolalPirelli

Copy link
Copy Markdown
Contributor

Get better soon!

Re: fixes and scaladoc, I tried fixing the most egregious bugs that were fixable without rewriting everything; if you're aware of other such problems in any part of the repo, do let me know. (In this case, having the doc of Option and common collections contain placeholders or incorrect replacements was... not good.)

@SolalPirelli

Copy link
Copy Markdown
Contributor

Is this still a draft?

@som-snytt

Copy link
Copy Markdown
Contributor Author

I'll push my local squash and retweak.

@som-snytt

som-snytt commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

This PR prefers quoting to escaping, as many usages should be code blocks.

Only the compiler project is touched, with the goal of silencing some warnings under

scala3-compiler-bootstrapped / doc

but maybe it also helps rendering of doc in an IDE, if anyone does that. I had a colleague who never read generated docs but only in the comfort of their beloved IDE.

I will try to start reading docs and also check the battery in the smoke detector.

Some doc, such as for local methods, might never be generated but only rendered in an IDE.

It might be nice to standardize on certain idioms, such as

  original
==>
  transformed

to describe transformations, in lieu of various synonymous locutions. I did not follow through with that idea.

@som-snytt
som-snytt marked this pull request as ready for review August 31, 2026 22:53
@som-snytt
som-snytt requested a review from SolalPirelli August 31, 2026 22:56
* or if `isGenericTuple`
*
* ```
* (x$1: (T1, ... Tn) => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* (x$1: (T1, ... Tn) => {
* (x$1: (T1, ... Tn)) => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants