Skip to content

Enable -Ycheck:all in Dotty Doc tests #4575

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 3 commits into from
May 28, 2018

Conversation

Duhemm
Copy link
Contributor

@Duhemm Duhemm commented May 24, 2018

No description provided.

relevantSyms.foreach { sym =>
expandParentDocs(sym)
val usecases = docbase.docstring(sym).map(_.usecases).getOrElse(Nil)

usecases.foreach { usecase =>
enterSymbol(createSymbol(usecase.untpdCode))
val createdSymbol = enterSymbol(createSymbol(usecase.untpdCode))
createdSymbol.setFlag(Flags.DocArtifact)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you avoid creating a new flag and use the symbol name instead (i.e. is the name a DocArtifactName)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't know about name.is, thanks!

@Duhemm Duhemm force-pushed the fix/dottydoc-ycheck branch from 40acf8c to d4e547c Compare May 28, 2018 13:12
@allanrenucci allanrenucci self-assigned this May 28, 2018
Duhemm added 3 commits May 28, 2018 16:00
We used to put the position of the doc artifact symbols
inside their names, which created a name that is not JVM-compatible.
This commit uses the fresh name creators to generate a fresh name for
every symbol introduced by the documentation.

The name is a fresh name composed of the name of the symbol that owns
the documentation, suffixed by `$doc`.
Doc comments that have already been cooked don't need to be cooked
again, and shouldn't be cooked again, because this would introduce
duplicate symbols.
@Duhemm Duhemm force-pushed the fix/dottydoc-ycheck branch from d4e547c to 639018f Compare May 28, 2018 14:01
@allanrenucci allanrenucci merged commit 4c0d37c into scala:master May 28, 2018
@allanrenucci allanrenucci deleted the fix/dottydoc-ycheck branch May 28, 2018 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants