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

Symbols not created for Json case classes in example #63

Closed
jonas opened this issue Sep 13, 2017 · 5 comments
Closed

Symbols not created for Json case classes in example #63

jonas opened this issue Sep 13, 2017 · 5 comments
Assignees
Labels

Comments

@jonas
Copy link
Collaborator

jonas commented Sep 13, 2017

The JsonTest file contains a pretty standard JSON ADT

sealed abstract class Json
case class JString(str: String) extends Json
// ...

No definition symbols seems to be generated for them. For example line 56 doesn't allow to "peek definition":

screen shot 2017-09-13 at 1 25 42 pm

@jonas jonas added the bug label Sep 13, 2017
@olafurpg
Copy link
Member

I just checked which files are used to build the site and it seems the test sources are not there

metadoc.cli.MetadocCli.getSymbols:73 db.documents.map(_.input.syntax): List(
  "paiges/core/src/main/scala/org/typelevel/paiges/Chunk.scala",
  "paiges/core/src/main/scala/org/typelevel/paiges/Doc.scala",
  "paiges/core/src/main/scala/org/typelevel/paiges/Document.scala",
  "paiges/core/src/main/scala/org/typelevel/paiges/package.scala",
  "paiges/core/src/test/scala/org/typelevel/paiges/DocumentTests.scala",
  "paiges/core/src/test/scala/org/typelevel/paiges/Generators.scala",
  "paiges/core/src/test/scala/org/typelevel/paiges/JsonTest.scala",
  "paiges/core/src/test/scala/org/typelevel/paiges/PaigesTest.scala"
)

I'm gonna refactor the cli to

@olafurpg olafurpg self-assigned this Sep 13, 2017
@jonas
Copy link
Collaborator Author

jonas commented Sep 13, 2017

Great. I hope we can also figure out a way to use the sbt plugin code to replace or implement the metadoc-site command.

@jonas jonas mentioned this issue Sep 13, 2017
@olafurpg
Copy link
Member

It seems the symbol is resolved but to a 404, I suspect that the resolved symbol is the case class apply which is not present in the source file. Should be fixable.

@olafurpg
Copy link
Member

No wait, it seems the problem is cause by the fact that JArray(...) references the synthetic companion object/term and case class JArray references the JArray type. This are two different symbols, we can fallback to a "normalized" match if the exact match doesn't work like I sometimes do in scalafix, that should solve it.

@olafurpg
Copy link
Member

Fixed in #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants