Skip to content

Conversation

@IvanCherepov
Copy link

@IvanCherepov IvanCherepov commented Jun 9, 2025

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


After 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/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

@IvanCherepov IvanCherepov requested a review from a team as a code owner June 9, 2025 21:34
@IvanCherepov
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@github-actions
Copy link

github-actions bot commented Jun 9, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@github-actions github-actions bot added the area/datastore Affects the storage system label Jun 9, 2025
authzedbot added a commit to authzed/cla that referenced this pull request Jun 9, 2025
Copy link
Contributor

@vroldanbet vroldanbet left a 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

@IvanCherepov IvanCherepov force-pushed the ivan-remove-dead-code-1719 branch from 927134c to 95c85ae Compare June 12, 2025 17:01
@github-actions github-actions bot added area/docs Affects docs or metadata (e.g. README) area/api v0 area/cli Affects the command line area/schema Affects the Schema Language area/api v1 Affects the v1 API area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) area/dispatch Affects dispatching of requests area/api http Affects the HTTP Gateway API labels Jun 12, 2025
@IvanCherepov IvanCherepov force-pushed the ivan-remove-dead-code-1719 branch from 95c85ae to 1a30689 Compare June 12, 2025 17:02
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/api http Affects the HTTP Gateway API area/api v1 Affects the v1 API area/cli Affects the command line area/datastore Affects the storage system area/dependencies Affects dependencies area/dispatch Affects dispatching of requests area/docs Affects docs or metadata (e.g. README) area/schema Affects the Schema Language area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove statically analyzable dead-code

2 participants