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

Don't print capabilities for type params when generating docs #2184

Merged
merged 1 commit into from Aug 21, 2017

Conversation

SeanTAllen
Copy link
Member

@SeanTAllen SeanTAllen commented Aug 21, 2017

Per #2145 (comment),
this shouldn't be allowed as its not legal Pony. As #2145 generally
comments on we only want legal code output in the documentation.

This addresses the specific issue in #2145, however, there are other
instances we might want to expand this to. I decided to limit to this
specifically as I think any change we make in other sections of docgen
would require a thorough auditing of output documentation to make sure
there weren't any unintended consquences.

Prior to this change, generated documentation for:

type Set[A: (Hashable #read & Equatable[A] #read)] is HashSet[A,
HashEq[A]]

would be

type Set[A: (Hashable #read & Equatable[A #read] #read)] is
  HashSet[A #read, HashEq[A #read] val] ref

now it is

type Set[A: (Hashable #read & Equatable[A] #read)] is
  HashSet[A, HashEq[A] val] ref

Per
#2145 (comment),
this shouldn't be allowed as its not legal Pony. As #2145 generally
comments on we only want legal code output in the documentation.

This addresses the specific issue in #2145, however, there are other
instances we might want to expand this to. I decided to limit to this
specifically as I think any change we make in other sections of docgen
would require a thorough auditing of output documentation to make sure
there weren't any unintended consquences.

Prior to this change, generated documentation for:

```pony
type Set[A: (Hashable #read & Equatable[A] #read)] is HashSet[A,
HashEq[A]]
```

would be

```pony
type Set[A: (Hashable #read & Equatable[A #read] #read)] is
  HashSet[A #read, HashEq[A #read] val] ref
```

now it is

```
type Set[A: (Hashable #read & Equatable[A] #read)] is
  HashSet[A, HashEq[A] val] ref
```
@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Aug 21, 2017
@SeanTAllen
Copy link
Member Author

@jemc @mfelsche is this enough to close #2145?

@mfelsche
Copy link
Contributor

Thanks for taking this one.

@jemc jemc merged commit f9f3a5a into master Aug 21, 2017
ponylang-main added a commit that referenced this pull request Aug 21, 2017
@jemc jemc deleted the issue-2145 branch August 21, 2017 15:30
@jemc
Copy link
Member

jemc commented Aug 21, 2017

@SeanTAllen yes, I'd expect the issue ticket to be complete after this one. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants