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

Document a bit more of the metamodel. #1846

Closed
wants to merge 3 commits into from
Closed

Document a bit more of the metamodel. #1846

wants to merge 3 commits into from

Conversation

cfa
Copy link
Contributor

@cfa cfa commented Mar 15, 2018

Add brief pages on Metamodel::ModuleHOW and Metamodel::PackageHOWand document their roles.

A couple of the roles included here are stubbed; they're included so that the newly added pages are properly cross referenced but would benefit from expansion, further examples.

RfC: @moritz, @niner, @ugexe.

=head1 Methods

=head2 method delegate_methods_to

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not a fan of listing methods without actually documenting them. Then people find them in the search, click on it... and learn absolutely nothing. Better to let them know right in the search that there is no documentation for it yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense (this is one of the roles that I was referring to in the description re: "stubbed").

We could change this to a one liner (as I have in ModuleHOW) to say something like: "Metamodel::MethodDelegation declares delegate_methods_to, delegating_methods_to and find_method (currently undocumented)."

At least that way there's some discoverability?

@zoffixznet
Copy link
Contributor

This appears to document things that aren't part of Perl 6 language:

~/R/rakudo/t/spec (master)$ grep -FIRn pretend_to_be .                                                                                                                                                                              
~/R/rakudo/t/spec (master)$ grep -FIRn delegate_methods_to .                                                                                                                                                                        
~/R/rakudo/t/spec (master)$ grep -FIRn pretend_to_be .
~/R/rakudo/t/spec (master)$ 

What's implemented in Rakudo is largely irrelevant; it's merely an implementation. The language is defined by the specification and at least three methods being documented here aren't even mentioned in it.

@zoffixznet zoffixznet added the NOTSPECCED need roast tests before documenting label Mar 15, 2018
@cfa
Copy link
Contributor Author

cfa commented Mar 15, 2018

@zoffixznet is TypePretense the only case of that, or are other roles here unspecced?

[Edit: oh, I see you have an example from MethodDelegation too.]

Suggestions on what to include then? It's rather difficult documenting the meta model in a partial way.

@zoffixznet
Copy link
Contributor

Suggestions on what to include then?

Grep the spec and see if there are any tests specifying the behaviour of the feature. The stuff that's specced can be documented. The rest needs a design decision and spec tests to cover the feature.

@cfa
Copy link
Contributor Author

cfa commented Mar 15, 2018

There's very little here that meets those criteria. Versioning seems to be specced for ver and auth (but not set_*); type_check and find_method can probably be documented too, though I need to dig into roast a little more to see whether those are the role methods.

I'm not sure how worthwhile it is to document the meta model in such a sparse and incomplete way, though; should this just be dropped?

@zoffixznet
Copy link
Contributor

We could leave the PR open until the stuff is specced.

You could open an Issue in roast, mentioning what methods aren't specced. Then people who are familiar with the design of the meta model can say which methods are meant to be part of the spec and which are just Rakudo's implementation detail. From then, it should be fairly easy to write the spec tests for the stuff that needs to be specced and then the PR documenting that stuff can go in.

@cfa
Copy link
Contributor Author

cfa commented Mar 15, 2018

SGTM. I'll draft something this afternoon.

Thanks @zoffixznet.

@coke
Copy link
Collaborator

coke commented Apr 16, 2018

FYI, this PR fails two tests:

xt/examples-compilation.t - doc/Type/Metamodel/Versioning.pod6 -- looks like declaring a variable might solve this issue.
xt/aspell.t - Looks like the majority of these are type names that need to be added to xt/words, but ("checkee" is slightly wonky, but comes directly from the rakudo source, so that's fine to add as well)

cfa added 2 commits April 16, 2018 08:27
Add brief pages on Metamodel::ModuleHOW and Metamodel::PackageHOW
and document their roles.

A couple of the roles included here are stubbed; they're included
so that the newly added pages are properly cross referenced but
would benefit from expansion, further examples.
Rename $checkee to $other; declare set_ver properly; declare new words.
@cfa
Copy link
Contributor Author

cfa commented Apr 16, 2018

@coke thanks; rebased the original commit onto the latest master, addressed the issues you raised in c86f9ef. (Not sure why shippable's failing.)

Frankly, though, I'm tempted to just close this PR and revisit the issue once everything's specced.

@JJ
Copy link
Contributor

JJ commented Apr 16, 2018 via email

@JJ
Copy link
Contributor

JJ commented May 22, 2018

It would be interesting to take a look at this now. Some of the stuff might be already specced, and anyway you have to update your copy due to the conflicts with xt/words.pws...

@JJ
Copy link
Contributor

JJ commented Jun 6, 2018

As with the rest of the NOTSPECCED documents and methods, I think it's better if it's very clear that they are part of the implementation, and documented as such. Would you please update these pages to include that?

@cfa cfa closed this Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NOTSPECCED need roast tests before documenting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants