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

Make *cli.Context implement context.Context by renaming Value #1597

Open
wants to merge 268 commits into
base: v2-maint
Choose a base branch
from

Conversation

marwan-at-work
Copy link
Contributor

This PR runs the gopls rename function on the *cli.Context.Value method to be renamed to GetValue. This makes the *cli.Context implement context.Context by default as the interface is already embedded into the struct, the only reason it didn't implement it before was because of that method name conflicting in the signature.

See #833 (comment)

@marwan-at-work marwan-at-work requested a review from a team as a code owner November 26, 2022 16:47
@marwan-at-work marwan-at-work mentioned this pull request Nov 26, 2022
21 tasks
@@ -20,6 +20,9 @@ type Context struct {
parentContext *Context
}

// ensures that Context always implements context.Context
var _ context.Context = &Context{}
Copy link
Contributor

Choose a reason for hiding this comment

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

Put this in context_test.go so that it does not effect built binary.

@dearchap
Copy link
Contributor

@marwan-at-work Can you rebase main ?

@meatballhat meatballhat added the status/blocked requires some external dependency label Jun 19, 2023
@dearchap dearchap changed the base branch from main to v2-maint November 30, 2023 22:46
@dolmen
Copy link
Contributor

dolmen commented Dec 22, 2023

The description doesn't say WHY you want cli.Context to implement context.Context. What value does this bring?
I only see bugs and confusion coming...

@bartekpacia
Copy link
Contributor

bartekpacia commented May 1, 2024

This PR changes a lot of code, there are tons of merge conflicts, and v2 is effectively in maintenance mode right now.

I'm leaning toward closing this PR, but would like to hear @meatballhat / @dearchap / @Juneezee opinion first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/blocked requires some external dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet