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

Show aliases in specification reference #370

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

jeromedalbert
Copy link
Contributor

@jeromedalbert jeromedalbert commented Jun 23, 2024

Fixes rubygems/rubygems#7790.

Problem

add_dependency is not documented in the specification reference, but it is documented in the rubydoc documentation. Since the specification is generated from the Gem::Specification class, similarly to rubydoc, I think the specification should also mention add_dependency as an alias.

Solution

Change the documentation template to show aliases in the specification reference like so:

02o9x

FYI there is currently only one alias, which is add_dependency.

Alternative solution

I mentioned in rubygems/rubygems#7790 that add_dependency seems to be more prominent, so alternatively we could show it more prominently in the reference by making it have its own entry as done in my other branch here, where the end result would look like this. I can update the PR if this way is preferred.

@jeromedalbert jeromedalbert changed the title Show aliases in specification documentation Show aliases in specification reference Jun 24, 2024
Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

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

Not totally sure about which one of your proposals is best, but both improve the current situation. I'd say let's at least add this and we can discuss adding a separate entry for aliases too, or even inverting this and calling add_runtime_dependency an alias of add_dependency, or using add_runtime_dependency in bundle gem generated template.

@jeromedalbert
Copy link
Contributor Author

All good points @deivid-rodriguez, where do you recommend discussing this?

@deivid-rodriguez
Copy link
Member

Let me merge this, and we can open a new issue in this repo, referencing this PR?

@deivid-rodriguez deivid-rodriguez merged commit 83e1a70 into rubygems:main Jun 26, 2024
1 check passed
@jeromedalbert jeromedalbert deleted the show-aliases-2 branch June 26, 2024 17:59
@jeromedalbert
Copy link
Contributor Author

jeromedalbert commented Jun 26, 2024

As I'm writing the issue, it looks like it is becoming more general and not just about the guides, so if you don't mind I'm going to create it in the rubygems/rubygems repo

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

Successfully merging this pull request may close these issues.

add_dependency alias is only partially documented
2 participants