Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Herd of Git processes on save #902

Closed
chowey opened this issue Jan 4, 2019 · 7 comments
Closed

Herd of Git processes on save #902

chowey opened this issue Jan 4, 2019 · 7 comments

Comments

@chowey
Copy link

chowey commented Jan 4, 2019

I am running GoSublime behind a proxy, so it cannot access the internet. I am running on a Windows computer.

I have a project with some external imports. When I press ctrl+S (save), I see a herd of Git processes (16+) launch in the Task Manager. Each one uses a full CPU, causing things to grid to a halt.

These Git processes seem to keep spawning for minutes.

I know for a fact that Git can't be succeeding, since I am behind a proxy. Is there a way to disable this behavior? What is it trying to do, anyway?

@chowey
Copy link
Author

chowey commented Jan 4, 2019

On second look, I don't think this is related to ctrl+S at all. These Git processes spawn just by looking at my file.

@DisposaBoy
Copy link
Owner

I am running GoSublime behind a proxy,

How? Unless I misunderstand, GoSublime only communicates over stdin/stdout/stderr in a way that's not configurable.

I have a project with some external imports. When I press ctrl+S (save), I see a herd of Git processes (16+) launch in the Task Manager. Each one uses a full CPU, causing things to grid to a halt.

These Git processes seem to keep spawning for minutes.

I know for a fact that Git can't be succeeding, since I am behind a proxy. Is there a way to disable this behavior? What is it trying to do, anyway?

AFAIK, GoSublime/margo doesn't do anything that could cause this unless you have it configured to do something.

  • What version of GoSublime are you using?
  • What does your GoSublime/margo configuration look like?
  • Maybe you have some linter running and this is triggering some bad behavior with Go modules (which are not supported) like go install trying to fetch stuff from the internet?

@chowey
Copy link
Author

chowey commented Jan 5, 2019

You are right, I am not running GoSublime "behind a proxy". My whole computer cannot access the internet, unless I route it through a proxy.

I was using the latest from:

git clone https://margo.sh/GoSublime

I reverted to an older clone of GoSublime I had, which was at 39bf06c. This does not have the same problem so I have been using that for now.

I am not sure the exact commit I had been using, since I have now deleted it. But it should have been the latest on the development branch, no?

In my GoSublime/margo configuration, I used the default but added golang.GoFmt to the list. I have no linter running. The project does have a go.mod file for Go modules. Would that do unexpected things?

@DisposaBoy
Copy link
Owner

The project does have a go.mod file for Go modules. Would that do unexpected things?

Yes it's very likely to cause problems because it silently changes the behavior of the go/build package and the go tool to start fetching packages it thinks are missing from the internet.

This means that the problem can be seen all the time because autocompletion involves importing packages.

You can verify by commenting out &golang.GocodeCalltips{} and &golang.Gocode{...}.

You can also see debugging output by adding a Debbug: true field to &golang.MarGocodeCtl{...}.

@chowey
Copy link
Author

chowey commented Jan 5, 2019

I updated GoSublime to the latest using git pull. It no longer seems to have the problem!

However, earlier I was running without any Go module dependencies being cached. Now all my Go module dependencies are cached. So Go wouldn't need to do any fetches to satisfy my imports.

I'm still a bit surprised that the latest GoSublime had the problem but the earlier GoSublime did not. And yes, the earlier GoSublime was running fine without any Go module dependencies being cached.

What are the plans on Go module support?

@DisposaBoy
Copy link
Owner

What are the plans on Go module support?

TBH, Go modules don't solve any problem that I have/had so I only work on it if it comes up as part of something through @KurokuLabs work.

Unfortunately I wasted half of last month's allotted Open Source time discovering golang/go#29452 so there is currently 0 motivation to work on it. It will depend on my mood when doing other work.

@chowey
Copy link
Author

chowey commented Jan 5, 2019

I read through your other issue so I understand better now the forces at play.

I have not been able to reproduce the issue even by deleting my Go module cache. I don't know what I changed in my environment. But so far things are working fine.

@chowey chowey closed this as completed Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants