"dep project X is out of sync" - forever
A really irritating popup that appears every few minutes is the "dep integration out of sync" popup. I have disabled all go tool popups in order to stop seeing it. When it comes up, I manually go into the project directory and run "dep check", which returns a status code 0, indicating that dep is in fact in sync. The system logs do not mention any "dep" or "ensure" process running. The event logs say the following:
6:13 PM Dep Integration
Dep project rumbled is out of sync.
Run dep ensure
Sometimes I humor it and click "run dep ensure" and it merrily ensures my dependencies are fine and reports back successfully. Nevertheless, a few minutes later, it claims my dependencies are out of sync. Has anyone else experienced this? Any hints or clues as to what could be going wrong?
请先登录再写评论。
Hi!
We need more info to reproduce the issue:
1) Could you provide a project sample where this issue manifests itself?
2) If not, we could use extended logs to find out what exactly is out of sync. For instructions, please follow:
https://youtrack.jetbrains.com/issue/GO-6640
Hi,
> Nevertheless, a few minutes later, it claims my dependencies are out of sync.
Have you changed any imports during this time? Is this possible that your project is really not synced and requires running `dep ensure` in order to add missing or delete unused libraries?
> Has anyone else experienced this?
I've never seen similar complains yet.
> Any hints or clues as to what could be going wrong?
I have the same issue too. This popup constantly arose when every change in every imports happens. Even after sort imports and just adding a new line or some space.
I think your dep integration should be a little bit smarter and understand that there is nothing changes if:
Right now (goland 2018.3.2) all of those events lead to this annoying popup and make this feature useless at all.
Seeing a similar issue on 2018.3.2. With dozens of applications in my project, the constant dep operations cause constant battery run-down, with the added bonus of the popups making the IDE a chore to use.
Could you please do the following:
To determine what exactly is out of sync:
Then create an issue and attach obtained logs here: https://youtrack.jetbrains.com/issues/GO.
Without logs, it is hard to say why pop-up is shown and if it is shown correctly.
Experiencing the same dep popup re-appearing uncontrollably. Sometimes the whole situation "escalates" and it spawns a dozen of background tasks for the same three projects that then semi-deadlock each other and wait and then spawn more tasks - in short total mayhem.
Even if I don't change anything but just switch back and forth between intellij window and e.g. web browser, the popup is being triggered and starts again:
Example output of such run:
GOROOT=...\Go #gosetup
GOPATH=...\go #gosetup
...\Go\bin\dep.exe status #gosetup
waiting for lockfile ...\go\pkg\dep\sm.lock: Locked by other process
waiting for lockfile ...\go\pkg\dep\sm.lock: Locked by other process
waiting for lockfile ...\go\pkg\dep\sm.lock: Locked by other process
waiting for lockfile ...\go\pkg\dep\sm.lock: Locked by other process
Gopkg.lock is out of sync with imports and/or Gopkg.toml. Run `dep check` for details.
PROJECT MISSING PACKAGES
input-digest mismatch
This annoyance is even worse than the dreadful reappearing SciView Toolbar :)
EDIT:
https://youtrack.jetbrains.com/issue/GO-7211
@Reinis could you please follow the comment my colleague posted just above your comment and help us by providing more information about how this happens? At the moment it's hard to tell even the version of the IDE you have. Thank you.
I was having the same issue and had to turn the dep integration off and move those projects that I had with dep to a new separate gopath root. The initial sync went balistic with the ide indexing while also doing dep ensures but it seems to have calmed down.
Looking at the series of events it looks like the lock file is applied per each dep project we have under the src where an ensure is being run. Each ensure must create a lock so they dont write the the pkg/dep/sources directory at the same time correct?
The problem i am seeing now is that there are projects that dep ensure has downloaded into the pkg/dep/sources directory that also have godep manifests and therefor the dep integration is raising them as being out of sync and not within any GOPATH/src.
Is there a way to turn dep integration off for that directory?
Hi. So, do I understand it correctly that you opened GOPATH as a project in GoLand? So, both GOPATH/src and GOPATH/pkg are a part of your opened project?
Correct. I have set the root of my project as the "Project GOPATH". Underneath i placed the src dir with the rest of the namespace structure. Dep then creates all the dependency modules under the pkg/dep/sources directory which in turn triggers the dep file integration.
From your comments I can infer that i should open the project folder itself and set a project GOPATH that is outside of the visible ide scope? That would probably solve the problem
Update: That actually solves the problem, thanks
What worked for me is I had a custom install of `dep` in `${GOPATH}/bin` on macOS. Instead, `dep` should be installed by your package manager and kept updated that way.
Once updated on disk, then make sure that the `dep` integration in IntelliJ knows about the new binary.
I don't know if it was helpful, but prior to that, I used `find . -name .git -exec bash -c 'pushd {} && git pull && popd' \;` on the command line to update everything, then removed `${GOPATH}/pkg`.
Everything is working now for me.