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

Fix missing deprecation tag #2605

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Fix missing deprecation tag #2605

merged 1 commit into from
Oct 16, 2023

Conversation

librick
Copy link
Contributor

@librick librick commented Oct 15, 2023

The pkg.go.dev website shows DEPRECATED tags for functions that are marked as deprecated, but the libp2p DialRanker function is missing a newline before the // Deprecated: line. As a result, even though the function is deprecated, pkg.go.dev does not tag/label it as deprecated.

This also affects language servers such as gopls.
With gopls enabled in VSCode (using the Go extension), deprecated functions are indicated with a strikethough. This strikethrough does not appear for DialRanker because of the missing newline.

I published my own module to test this.
See: https://pkg.go.dev/github.com/librick/[email protected]/deprecated

The pkg.go.dev website shows `DEPRECATED` tags for functions
that are marked as deprecated, but the libp2p `DialRanker` function
is missing a newline before the `// Deprecated:` line.
As a result, even though the function is deprecated,
pkg.go.dev does not tag/label it as deprecated.

This also affects language servers such as gopls.
With gopls enabled in VSCode (using the Go extension),
deprecated functions are indicated with a strikethough.
This strikethrough does not appear for `DialRanker` because of the
missing newline.

I published my own module to test this.
See: https://pkg.go.dev/github.com/librick/[email protected]/deprecated
Copy link
Member

@sukunrt sukunrt left a comment

Choose a reason for hiding this comment

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

Thanks @librick

@sukunrt sukunrt merged commit 0188687 into libp2p:master Oct 16, 2023
sukunrt pushed a commit that referenced this pull request Oct 18, 2023
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.

2 participants