-
Notifications
You must be signed in to change notification settings - Fork 321
Remove dead code #2438
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
base: main
Are you sure you want to change the base?
Remove dead code #2438
Conversation
… SubjectByTypeSet.Len
…bugAnalyzeBeforeStatistics
…ebugAnalyzeBeforeStatistics
…unc: tracingLogger.Log
…AnalyzeBeforeStatistic
…: WithQueryInterceptor
…unc: ConnectWithInstrumentation
…: RemoteDispatchTimeout
…oundError.NamespaceName
…oundError.NotFoundRelationNa
…or.MarshalZerologObject
…oundError.DetailsMetadata
…tFoundErr internal/graph/errors.go:136:6: unreachable func: NewRelationMissingTypeInfoErr
…ternal/logging/logger.go:47:6: unreachable func: Printf
… func: FromContext and internal/middleware/dispatcher/dispatcher.go:38:6: unreachable func: MustFromContext
…c: WithUnaryServiceSpecificInterceptor.UnaryInterceptor
…sterDeveloperServer
…43: cannot use RelationNotFoundError{} (value of type RelationNotFoundError) as sharederrors.UnknownRelationError value in variable declaration: RelationNotFoundError does not implement sharederrors.UnknownRelationError (missing method NamespaceName)
…43: cannot use RelationNotFoundError{} (value of type RelationNotFoundError) as sharederrors.UnknownRelationError value in variable declaration: RelationNotFoundError does not implement sharederrors.UnknownRelationError (missing method NotFoundRelationName)
…erceptor.go:44:45: cannot use WithUnaryServiceSpecificInterceptor{} (value of type WithUnaryServiceSpecificInterceptor) as servicespecific.ExtraUnaryInterceptor value in variable declaration: WithUnaryServiceSpecificInterceptor does not implement servicespecific.ExtraUnaryInterceptor (missing method UnaryInterceptor)
…spatcher.go:13:22: undefined: dispatchermw.FromContext
…:31:25: undefined: shared.AsValidationError
…able func: WithUnaryServiceSpecificInterceptor.UnaryInterceptor" This reverts commit 441cda7.
…func: AsValidationError" This reverts commit 13c5af5.
…eachable func: FromContext and internal/middleware/dispatcher/dispatcher.go:38:6: unreachable func: MustFromContext" This reverts commit ff9785d.
…nt an internal/logging/logger.go:47:6: unreachable func: Printf" This reverts commit 2cafd77.
This reverts commit fe86faa.
…FailExpand" This reverts commit def7020.
…Result.ResultError" This reverts commit 31c70a5.
…nimplementedErr" This reverts commit 796a6f2.
…lationNotFoundErr" This reverts commit 23e7022.
…lationNotFoundErr" This reverts commit a5d0186.
…tionNotFoundError.DetailsMetadata" This reverts commit 5587d0c.
…FoundError.MarshalZerologObject" This reverts commit da1f8fb.
…tionNotFoundError.NotFoundRelationNa" This reverts commit 45e8077.
…tionNotFoundError.NamespaceName" This reverts commit fed7efb.
…waysFailErr" This reverts commit 6780f19.
…ble func: RemoteDispatchTimeout" This reverts commit 94d707b.
…chable func: ConnectWithInstrumentation" This reverts commit 8b2f9f3.
…ble func: WithQueryInterceptor" This reverts commit feb1a98.
…c: DebugAnalyzeBeforeStatistic" This reverts commit 7bb1f2b.
…chable func: tracingLogger.Log" This reverts commit c005116.
… func: DebugAnalyzeBeforeStatistics" This reverts commit 0ceb39e.
…func: DebugAnalyzeBeforeStatistics" This reverts commit 0e1f6bc.
I have read the CLA Document and I hereby sign the CLA |
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, please clean up the commit history (one single commit) and undo superfluous changes. Also please use the same commit author as the GitHub user otherwise the CLA check won't pass
// NamespaceName returns the name of the namespace in which the relation was not found. | ||
func (err RelationNotFoundError) NamespaceName() string { | ||
return err.namespaceName | ||
} | ||
|
||
// NotFoundRelationName returns the name of the relation not found. | ||
func (err RelationNotFoundError) NotFoundRelationName() string { | ||
return err.relationName | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change seems superfluous
@@ -45,6 +41,11 @@ func (wssi WithServiceSpecificInterceptors) StreamInterceptor() grpc.StreamServe | |||
return wssi.Stream | |||
} | |||
|
|||
// UnaryInterceptor implements servicespecific.ExtraUnaryInterceptor | |||
func (wussi WithUnaryServiceSpecificInterceptor) UnaryInterceptor() grpc.UnaryServerInterceptor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change seems superfluous
Fixes #1719
I can't reopen #2157 (
locked and limited conversation to collaborators
) --> created a new PR.Before the last commit:
➜ spicedb git:(ivan-remove-dead-code-1719) deadcode -test ./... | grep -v pkg
internal/datastore/crdb/options.go:329:6: unreachable func: DebugAnalyzeBeforeStatistics
internal/datastore/mysql/options.go:218:6: unreachable func: DebugAnalyzeBeforeStatistics
internal/datastore/postgres/log_tracer.go:13:25: unreachable func: tracingLogger.Log
internal/datastore/postgres/options.go:341:6: unreachable func: DebugAnalyzeBeforeStatistics
internal/datastore/postgres/options.go:348:6: unreachable func: WithQueryInterceptor
internal/datastore/postgres/common/pgx.go:166:6: unreachable func: ConnectWithInstrumentation
internal/developmentmembership/trackingsubjectset.go:59:32: unreachable func: TrackingSubjectSet.RemoveFrom
internal/dispatch/combined/combined.go:129:6: unreachable func: RemoteDispatchTimeout
internal/graph/errors.go:59:6: unreachable func: NewAlwaysFailErr
internal/graph/errors.go:73:34: unreachable func: RelationNotFoundError.NamespaceName
internal/graph/errors.go:78:34: unreachable func: RelationNotFoundError.NotFoundRelationName
internal/graph/errors.go:82:34: unreachable func: RelationNotFoundError.MarshalZerologObject
internal/graph/errors.go:87:34: unreachable func: RelationNotFoundError.DetailsMetadata
internal/graph/errors.go:95:6: unreachable func: NewRelationNotFoundErr
internal/graph/errors.go:136:6: unreachable func: NewRelationMissingTypeInfoErr
internal/graph/errors.go:179:6: unreachable func: NewUnimplementedErr
internal/graph/graph.go:30:24: unreachable func: ExpandResult.ResultError
internal/graph/graph.go:38:6: unreachable func: AlwaysFailExpand
internal/logging/logger.go:39:6: unreachable func: Log
internal/logging/logger.go:43:6: unreachable func: Print
internal/logging/logger.go:47:6: unreachable func: Printf
internal/middleware/dispatcher/dispatcher.go:28:6: unreachable func: FromContext
internal/middleware/dispatcher/dispatcher.go:38:6: unreachable func: MustFromContext
internal/services/shared/errors.go:109:6: unreachable func: AsValidationError
internal/services/shared/interceptor.go:16:50: unreachable func: WithUnaryServiceSpecificInterceptor.UnaryInterceptor
internal/services/v0/developer.go:26:6: unreachable func: RegisterDeveloperServer
internal/testfixtures/generator.go:18:6: unreachable func: RandomObjectID
➜ spicedb git:(ivan-remove-dead-code-1719) ✗ deadcode -test ./... | grep -v pkg
internal/datastore/crdb/options.go:329:6: unreachable func: DebugAnalyzeBeforeStatistics
internal/datastore/mysql/options.go:218:6: unreachable func: DebugAnalyzeBeforeStatistics
internal/datastore/postgres/options.go:341:6: unreachable func: DebugAnalyzeBeforeStatistics
internal/datastore/postgres/options.go:348:6: unreachable func: WithQueryInterceptor
internal/datastore/postgres/common/pgx.go:166:6: unreachable func: ConnectWithInstrumentation
internal/dispatch/combined/combined.go:129:6: unreachable func: RemoteDispatchTimeout
internal/graph/errors.go:59:6: unreachable func: NewAlwaysFailErr
internal/graph/errors.go:77:6: unreachable func: NewRelationNotFoundErr
internal/graph/errors.go:86:34: unreachable func: RelationNotFoundError.NamespaceName
internal/graph/errors.go:91:34: unreachable func: RelationNotFoundError.NotFoundRelationName
internal/graph/errors.go:128:6: unreachable func: NewRelationMissingTypeInfoErr
internal/graph/errors.go:171:6: unreachable func: NewUnimplementedErr
internal/graph/graph.go:35:6: unreachable func: AlwaysFailExpand
internal/logging/logger.go:39:6: unreachable func: Log
internal/logging/logger.go:43:6: unreachable func: Print
internal/logging/logger.go:47:6: unreachable func: Printf
internal/middleware/dispatcher/dispatcher.go:28:6: unreachable func: FromContext
internal/middleware/dispatcher/dispatcher.go:38:6: unreachable func: MustFromContext
internal/services/shared/errors.go:109:6: unreachable func: AsValidationError
internal/services/shared/interceptor.go:45:50: unreachable func: WithUnaryServiceSpecificInterceptor.UnaryInterceptor
internal/services/v0/developer.go:26:6: unreachable func: RegisterDeveloperServer
internal/testfixtures/generator.go:18:6: unreachable func: RandomObjectID