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

Validate should validate Scaladocs too #516

Closed
non opened this issue Sep 2, 2015 · 8 comments
Closed

Validate should validate Scaladocs too #516

non opened this issue Sep 2, 2015 · 8 comments

Comments

@non
Copy link
Contributor

non commented Sep 2, 2015

Right now it's possible to have Scaladoc errors which aren't caught by validate.

We should have it run compile:doc (or similar) for each project in addition to the other work it is doing.

@ceedubs
Copy link
Contributor

ceedubs commented Sep 3, 2015

@non I'm unable to reproduce this. Do you have an example of a change that should cause it to fail but doesn't? It includes a makeSite call, which should compile the ScalaDocs.

@non
Copy link
Contributor Author

non commented Sep 3, 2015

In the BimonadLaws scaladoc, change the "Bimonad" to a "[[Bimonad]]" and run laws/compile:doc.

@ceedubs
Copy link
Contributor

ceedubs commented Sep 4, 2015

Ah, I suspect this and #510 have the same root cause.

@ceedubs ceedubs self-assigned this Sep 4, 2015
@ceedubs
Copy link
Contributor

ceedubs commented Sep 4, 2015

I think I see the issue. PR incoming.

@ceedubs
Copy link
Contributor

ceedubs commented Sep 4, 2015

Hmm. I thought it was as easy as adding the laws project to https://github.com/non/cats/blob/672e0105f2d0136c3185ff79300a002384a2ec8b/build.sbt#L58 but I get some bizarre errors if I try to do that. I'm not sure what is going on.

@ceedubs ceedubs removed their assignment Sep 4, 2015
@non
Copy link
Contributor Author

non commented Sep 4, 2015

Ohhhh, now I'm almost remembering something. I think maybe we hit these errors a long time ago and disabled the laws project because we didn't understand them.

I also wonder if any of this is related to #510.

@mikejcurry
Copy link
Contributor

Investigated this for a little. After making the change outlined @ceedubs the doc build starts to fail. Some observations:

  • For the most part the issues are confined to a couple of areas
    • References to Foldable typeclass syntax
    • References to Apply typeclass syntax
  • Example:
    • TraverseLaws references an implicit Traversable[F]
    • TraverseLaws also imports the foldable syntax
    • At line 59, TraverseLaws tries to use this syntax val rhs: B = fa.foldMap(f), but this fails compilation
    • Changing the code here to not use the syntax results in correct compilation, i.e. val rhs: B = F.foldMap(fa)(f) compiles successfully during doc generation

Interestingly,

  • The Traverse syntax used in the TraverseLaws is fine and compiles, so not all syntax is affected, and the Traverse syntax does not seem to use simulacrum for syntax, even though the typeclass uses simulacrum.
  • References to the Foldable syntax in the FoldableLaws class is also failing, indicating that it is not specific to the usage in Traverse.
  • A similar problem occurs with the Apply syntax in all areas that Apply syntax is used in the laws.

There is something peculiar about the specific syntax for these two type classes that when compiled in this specific context, the compilation is failing.

There may be other things at play here, and the path may end up being a dead end, but wanted to record this anyway in case it triggers any thoughts for anyone else.

@ceedubs
Copy link
Contributor

ceedubs commented Sep 30, 2018

I think that this is due to #510, so I'm going to close it out as a duplicate of that.

@ceedubs ceedubs closed this as completed Sep 30, 2018
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

No branches or pull requests

3 participants