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

Docs: Prevent virtual types reaching docs generator #6246

Merged
merged 1 commit into from
Jun 25, 2018

Conversation

bcardiff
Copy link
Member

Fixes #6201

I was unable to reduce the code for a short repro. But somehow the Lucky::Routeable managed to produce some virtual types that were not handled in the docs generator.

Virtual types does not make sense in the doc generator since from the user perspective they are always substitutable by a subclass. That is what virtual types represent inside the compiler, while a type is an exact reference. This serves mainly during the codegen.

@paulcsmith, would you mind checking the the output is the expected one? The method that complained was Lucky::Route#action that was returning a virtual type of Lucky::Action.class

@bcardiff bcardiff added kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:docs labels Jun 22, 2018
@bcardiff bcardiff added this to the 0.25.1 milestone Jun 22, 2018
@paulcsmith
Copy link
Contributor

Thanks @bcardiff! Just to be clear, do you want me to pull this branch done and try to use it to generate docs for Lucky?

@bcardiff
Copy link
Member Author

I did and the docs were generated. So far the output seems right, but you might want to double check it. So, yes please if you want :-)

@paulcsmith
Copy link
Contributor

Awesome! Thanks so much for the fix. I'm excited to give it a try

@RX14 RX14 merged commit b700ad9 into crystal-lang:master Jun 25, 2018
@bcardiff bcardiff deleted the fix/docs-virtualtype branch June 26, 2018 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:docs topic:compiler topic:tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants