mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:51:57 +00:00
codeintel: make usage-range non-optional (#64236)
Closes https://linear.app/sourcegraph/issue/GRAPH-727/make-range-for-usagerange-non-optional ## Test plan Tests continue to pass
This commit is contained in:
parent
4a565a8819
commit
7fc92a5538
@ -746,7 +746,7 @@ type Usage {
|
||||
# Invariant: `range.path` == `blob.path`. The path is made available
|
||||
# as part of this type for convenience.
|
||||
# """
|
||||
usageRange: UsageRange
|
||||
usageRange: UsageRange!
|
||||
|
||||
# TODO: Add a blob: GitBlob field here for more flexibility?
|
||||
|
||||
|
||||
@ -179,8 +179,8 @@ func (u *usageResolver) DataSource() *string {
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (u *usageResolver) UsageRange(ctx context.Context) (resolverstubs.UsageRangeResolver, error) {
|
||||
return u.usageRange, nil
|
||||
func (u *usageResolver) UsageRange(ctx context.Context) resolverstubs.UsageRangeResolver {
|
||||
return u.usageRange
|
||||
}
|
||||
|
||||
func (u *usageResolver) SurroundingContent(ctx context.Context) string {
|
||||
|
||||
@ -533,7 +533,7 @@ type UsageResolver interface {
|
||||
Symbol(context.Context) (SymbolInformationResolver, error)
|
||||
Provenance(context.Context) (codenav.CodeGraphDataProvenance, error)
|
||||
DataSource() *string
|
||||
UsageRange(context.Context) (UsageRangeResolver, error)
|
||||
UsageRange(context.Context) UsageRangeResolver
|
||||
SurroundingContent(_ context.Context) string
|
||||
UsageKind() SymbolUsageKind
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user