Comments (5)
Thank you for the repro case - I was able to reproduce the issue. Let's continue the conversation in the upstream gopls
issue: golang/go#39124.
from vscode-go.
@daaku Are you using the language server? Can you share your extension-related settings (go
or [go]
prefixes)?
If you enabled the language server, can you please capture the gopls logs following the instruction. I hope that shows us whether the gopls
, the go language server, detected the go.mod
file change or not.
from vscode-go.
The go related settings I have are:
"go.formatTool": "goimports",
"go.useLanguageServer": true,
I confirmed that this still happens (gopls
just got updated to 0.4.1 and the extension to 0.14.2
). I captured the log but it contains too much information for me to just share as is. I'll create a empty project and capture the logs and update later.
from vscode-go.
Thanks! It's also fine to redact information in the log if that's easier.
from vscode-go.
The trace of a new empty project where I open a file with 3 lines of code and reproduce the issue is nearly 1500 lines and 1.5MB in size. That's too much for me to go an audit to make me feel safe sharing.
Here's a set of repro steps, hopefully that's enough:
mkdir gt
cd gt
go mod init github.com/daaku/gt
touch main.go
code .
# wait for vscode to open, open main.go, don't write anything yet
# then back in the terminal
go get github.com/pkg/errors
No go to the vscode window that is open, open main.go
and type this in:
package main
import "github.com/pkg/errors"
var foo = errors.WithStack(nil)
- Hit save.
- See the package gets a yellow squiggly with the warning "github.com/pkg/errors is not in your go.mod file.go".
- Click on the
go.mod
file in the browser sidebar. - The file opens and the warning disappears.
from vscode-go.
Related Issues (20)
- go.formatFlags not working with gofmt -s (simplify) HOT 5
- Couldn't start client gopls HOT 5
- Unable to run Go in VS Code - command not found HOT 4
- Can not use VS code for GO: Installing github.com/go-delve/delve/cmd/dlv FAILED HOT 5
- Disable real-time syntax error highlighting with gopls HOT 1
- Problem in mouse hover tooltip HOT 3
- Automatically Infer Path Mapping for Remote Debugging
- // .*DO NOT EDIT.?$ HOT 6
- Extension issue HOT 1
- 0.14.2 broken on macos HOT 3
- Extension Repository Migration Plan HOT 1
- Region comments not working when extension is enabled HOT 3
- Debugging uses wrong working directory HOT 4
- Background of covered and not covered code cannot be removed after running package test HOT 9
- Extension Migration Plan HOT 4
- numeric constants containing underscore are not colored correctly HOT 1
- Gopls does not support versions of go <=1.12 HOT 2
- Unable to set breakpoint when using gutter and clear Code coverage HOT 3
- Updated to 0.14.3 or the nightly and entirely stopped working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-go.