-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
If you do an aliased import, we get a local definition:
pb "gogoproto/some/package/some-name-proto"
// ^^ definition local 0
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reference scip-go gomod gogoproto/some/package/some-name-proto 0.0.1 gogoproto/some/package/some-name-proto/
When importing a package as a FQN we don't get a definition for the actual variable that is used inside the code:
import (
"context"
// ^^^^^^^ reference scip-go gomod github.com/golang/go/src 1.20.4 context/
"time"
// ^^^^ reference scip-go gomod github.com/golang/go/src 1.20.4 time/
"golang.org/x/mod/modfile"
// ^^^^^^^^^^^^^^^^^^^^^^^^ reference scip-go gomod golang.org/x/mod/modfile 0.0.1 golang.org/x/mod/modfile/
)
Expected:
import (
"golang.org/x/mod/modfile"
// ^^^^^^^^^^^^^^^^^^^^^^^^ reference scip-go gomod golang.org/x/mod/modfile 0.0.1 golang.org/x/mod/modfile/
// ^^^^^^^ reference ...
)
I don't know what the best way of defining this is, but it may even make sense to split up the entire import path into its constituent parts like so. This would match how java does packages in scip-java.
import (
"golang.org/x/mod/modfile"
// ^^^^^^^^^^^ reference scip-go gomod golang.org 0.0.1 golang.org/
// ^^ reference scip-go gomod golang.org/x 0.0.1 golang.org/x/
// ^^^^ reference scip-go gomod golang.org/x/mod 0.0.1 golang.org/x/mod/
// ^^^^^^^ reference scip-go gomod golang.org/x/mod/modfile 0.0.1 golang.org/x/mod/modfile/
// ^^^^^^^ definition local 0
)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels