go/internal/span
Alan Donovan 02bef08ac8 go/packages/packagestest: break dependency on gopls' span package
The span package is properly part of gopls, and we'd like to move
it into that module. However, the packagestest package unfortunately
depends on span.Span as an alternative notation for Ranges.

This change decouples span.Span from packagestest.Range using a
new (unexported for now) rangeSetter interface, which Span implements.
Neither package depends on the other.

Technically this is a breaking API change:
all the Range methods have gone away, as have the Span, URI,
and Point types and their methods, which were accessible via
Range.Span(). However, clients would not be able to access
these internal types, and I think it is highly unlikely that
anyone depends on it. Nonethless this is a cautionary tale about
the risks from one innocuous-looking type alias declaration.

Change-Id: I8acb03f4acb1f798f304b03648445e37a44f9c45
Reviewed-on: https://go-review.googlesource.com/c/tools/+/439715
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-10-07 14:18:09 +00:00
..
parse.go internal/lsp/cache: parse filenames from go list errors correctly 2021-03-02 01:39:30 +00:00
span.go go/packages/packagestest: break dependency on gopls' span package 2022-10-07 14:18:09 +00:00
span_test.go internal/span: eliminate TokenConverter 2022-06-01 19:19:15 +00:00
token.go internal/diff: simplify API, break span dependency 2022-10-05 20:32:15 +00:00
token_test.go internal/span: eliminate TokenConverter 2022-06-01 19:19:15 +00:00
uri.go internal/lsp: update the broken workspace message to mention go.work 2022-08-08 18:10:56 +00:00
uri_test.go all: go fmt ./... 2021-02-20 03:28:52 +00:00
uri_windows_test.go all: go fmt ./... 2021-02-20 03:28:52 +00:00
utf16.go internal/lsp/mod: fix broken assumptions about file base 2022-06-01 22:04:06 +00:00
utf16_test.go internal/span: remove check for nil content 2020-09-02 00:13:12 +00:00