Skip to content
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

Scaladoc: fails to generate doc for ScAS #21662

Open
rjolly opened this issue Sep 27, 2024 · 9 comments · May be fixed by #22156
Open

Scaladoc: fails to generate doc for ScAS #21662

rjolly opened this issue Sep 27, 2024 · 9 comments · May be fixed by #22156
Assignees
Labels
area:doctool itype:bug regression This worked in a previous version but doesn't anymore

Comments

@rjolly
Copy link
Contributor

rjolly commented Sep 27, 2024

Compiler version

3.5.1

Minimized code

git clone https://github.com/rjolly/scas.git
cd scas
./mill -i -D dottyVersion=3.5.1 scas.docJar

Output

Problem parsing projects\scas\scas\src\scas\base\BigInteger.scala:[0..13..2002], documentation may not be generated.
[...]

Expectation

It would be good to at least uncomment e.printStackTrace() in dotty/scaladoc/src/dotty/tools/scaladoc/tasty/TastyParser.scala (and put it under a flag eventually), so as to know more about the problem.

@rjolly rjolly added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Sep 27, 2024
@Gedochao Gedochao added area:doctool stat:needs minimization Needs a self contained minimization and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Sep 27, 2024
@Gedochao
Copy link
Contributor

I'd say we need a minimised example to work on this.

@rjolly
Copy link
Contributor Author

rjolly commented Sep 27, 2024

trait Monoid[T]:
  extension (a: T)
    def \:[U](b: U) = ???
Problem parsing scas/src/Monoid.scala:<0..61>, documentation may not be generated.

@rjolly
Copy link
Contributor Author

rjolly commented Sep 27, 2024

This one fails too:

trait C[T]
trait Equiv[T]:
  extension[U: C] (x: U)
    def ><[V](y: V) = ???
Problem parsing scas/src/Equiv.scala:[0..18..117], documentation may not be generated.

@rjolly
Copy link
Contributor Author

rjolly commented Sep 27, 2024

I think these are the two sole problems. Other than that, my doc generation will be fine. What would be cool is if parsing problems did not propagate, that is, currently if one class has a problem then all its subclasses too, transitively. This makes it hard to point it.

@Gedochao
Copy link
Contributor

Gedochao commented Sep 30, 2024

Both minimized examples seem to generate scaladoc for 3.3.0 and then break for 3.3.1+.
The output for 3.3.0:

scala-cli doc repro.scala -S 3.3.0
# Following generated file paths might not be compatible with Jekyll:
# _empty_/Equiv
# _empty_/C
# If using GitHub Pages consider adding a ".nojekyll" file.
# Wrote Scaladoc to ./scala-doc

@Gedochao Gedochao added regression This worked in a previous version but doesn't anymore and removed stat:needs minimization Needs a self contained minimization labels Sep 30, 2024
@Gedochao Gedochao added the stat:needs bisection Need to use nightly builds and git bisect to find out the commit where this issue was introduced label Sep 30, 2024
@rjolly
Copy link
Contributor Author

rjolly commented Oct 1, 2024

org.scala-lang#scaladoc_3;3.3.1-RC1-bin-20230202-af95ceb-NIGHTLY : no error
org.scala-lang#scaladoc_3;3.3.1-RC1-bin-20230203-3ef1e73-NIGHTLY : error

in between : introduction of clause interleaving. Cc @Sporarum

@Gedochao Gedochao removed the stat:needs bisection Need to use nightly builds and git bisect to find out the commit where this issue was introduced label Oct 2, 2024
@rjolly
Copy link
Contributor Author

rjolly commented Oct 4, 2024

The error message:

java.lang.AssertionError: assertion failed: croppedUnshuffledMemberInfoParamLists and SymOps.nonExtensionParamLists disagree on whether this clause is a type or term one
	at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
	at dotty.tools.scaladoc.tasty.ClassLikeSupport.$anonfun$21(ClassLikeSupport.scala:391)

@Sporarum
Copy link
Contributor

I don't have the time to look into it at the moment I'm afraid, maybe @mbovel or @smarter can have a look ?

@mbovel
Copy link
Member

mbovel commented Oct 17, 2024

This issue is already assigned to Mikołaj, so I'll let him have a look, but I am happy to help if needed 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:doctool itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants