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

*Not* using margo extension: Error: cannot find package "margo" in any of #891

Open
xiaoke1989 opened this issue Nov 29, 2018 · 10 comments
Open

Comments

@xiaoke1989
Copy link

Not using margo extension: Error: cannot find package "margo" in any of
[16:12:05] margo: agent#007: log: go install -v -tags=margo margo.sh/cmd/margo.sublime
[16:12:07] margo: agent#007: log: C:\go\bin\margo.sublime.exe -codec msgpack
[16:12:09] margo: agent#007: log: store.go:137: started
[16:12:11] margo: agent#007: log: restart.go:145: Mg/Restart: exit status 1
[16:12:11] margo: agent#007: log: go install -v -tags=margo margo.sh/cmd/margo.sublime
[16:12:11] margo: agent#007: log: press ctrl+.,ctrl+x to configure margo or check console for errors
[16:12:11] margo: agent#007: log: Not using margo extension: Error: cannot find package "margo" in any of:
[16:12:11] margo: agent#007: log: C:\go\src\margo (from $GOROOT)
[16:12:11] margo: agent#007: log: D:\Program Files (x86)\Sublime Text Build\Data\Packages\User\GoSublime\src\margo (from $GOPATH)
[16:12:11] margo: agent#007: log: D:\Program Files (x86)\Sublime Text Build\Data\Packages\GoSublime\src\margo
[16:12:11] margo: agent#007: log: agent GOPATH is D:\Program Files (x86)\Sublime Text Build\Data\Packages\User\GoSublime;D:\Program Files (x86)\Sublime Text Build\Data\Packages\GoSublime

My Golang.sublime.setting is like this :
{
"env": {
"GOROOT":"C:\go",
"GOBIN":"C:\go\bin",
"GOPATH": "E:\go",
"GOARCH":"amd64",
"GOOS":"windows",
"PATH":"%GOBIN%;%PATH%"
},
"comp_lint_enabled": true,
"use_gs_gopath":true,
"comp_lint_commands": [
{"cmd": ["go", "install"]}
],

"on_save": [
    {"cmd":"gs_comp_lint"}   
]

}

How to resolve this problem?

@DisposaBoy
Copy link
Owner

Did you follow the instructions and press ctrl+.,ctrl+x?

@xiaoke1989
Copy link
Author

Did you follow the instructions and press ctrl+.,ctrl+x?

My submine press ctrl+.,ctrl+x can't open a window

@xiaoke1989
Copy link
Author

Did you follow the instructions and press ctrl+.,ctrl+x?

I try to change the Key Bindings to anothor one and opened the margo.go

@DisposaBoy
Copy link
Owner

My submine press ctrl+.,ctrl+x can't open a window

I'm not sure I understand. Are you saying the key binding doesn't do anything? You need to press ctrl+., then keep holding ctrl and press x.

In either case, the command is available via the Sublime Text command palette under the name GoSublime: Editor Margo Extension.

@justay
Copy link

justay commented Dec 13, 2018

hi, I get the same problem.

[16:21:07] margo: agent#007: ['C:\\Users\\me\\AppData\\Roaming\\Sublime Text 3\\Packages\\GoSublime\\bin\\margo.sh.exe', 'start', 'margo.sublime', '-codec', 'msgpack']
[16:21:07] margo: agent#007: log: ``` go install -v -tags=margo margo.sh/cmd/margo.sublime ```
[16:21:08] margo: agent#007: log: ``` "C:\\Users\\me\\AppData\\Roaming\\Sublime Text 3\\Packages\\GoSublime\\bin\\margo.sublime.exe" -codec msgpack ```
[16:21:08] margo: agent#007: log: store.go:137: started
[16:21:08] margo: agent#007: log: restart.go:145: Mg/Restart: exit status 1
[16:21:08] margo: agent#007: log: ``` go install -v -tags=margo margo.sh/cmd/margo.sublime ```
[16:21:08] margo: agent#007: log: press ` ctrl+. `,` ctrl+x ` to configure margo or check console for errors
[16:21:08] margo: agent#007: log: *Not* using margo extension: Error: cannot find package "margo" in any of:
[16:21:08] margo: agent#007: log: 	C:\Go\src\margo (from $GOROOT)
[16:21:08] margo: agent#007: log: 	C:\Users\me\AppData\Roaming\Sublime Text 3\Packages\User\GoSublime\src\margo (from $GOPATH)
[16:21:08] margo: agent#007: log: 	C:\Users\me\AppData\Roaming\Sublime Text 3\Packages\GoSublime\src\margo

go version is 1.11.
running on windows 10

when i open margo.go , what should i do to fix the probelm?
thanks. bro.

@DisposaBoy
Copy link
Owner

@justay If you've followed the (admittedly poor) instructions on https://margo.sh/b/migrate/ you just need to save the file and margo should restart automatically.

@rezovax
Copy link

rezovax commented Dec 17, 2018

[10:17:42] margo: agent#010: stopping
[10:17:42] margo: agent#011: starting
[10:17:42] margo: agent#011: ['/home/alex/.config/sublime-text-3/Packages/GoSublime/bin/margo.sh', 'start', 'margo.sublime', '-codec', 'msgpack']
[10:17:42] margo: agent#011: log: ``` go install -v -tags=margo margo.sh/cmd/margo.sublime ```
[10:17:42] margo: agent#011: log: ``` /home/alex/go/bin/margo.sublime -codec msgpack ```
[10:17:42] margo: agent#011: log: store.go:137: started
[10:17:42] margo: agent#011: log: restart.go:145: Mg/Restart: exit status 1
[10:17:42] margo: agent#011: log: ``` go install -v -tags=margo margo.sh/cmd/margo.sublime ```
[10:17:42] margo: agent#011: log: press ` ctrl+. `,` ctrl+x ` to configure margo or check console for errors
[10:17:42] margo: agent#011: log: *Not* using margo extension: Error: /home/alex/.config/sublime-text-3/Packages/User/GoSublime/src/margo/margo.go:1:1: expected 'package', found 'import' (and 1 more errors)
[10:17:42] margo: agent#011: log: agent GOPATH is /home/alex/.config/sublime-text-3/Packages/User/GoSublime:/home/alex/.config/sublime-text-3/Packages/GoSublime

help, how to fix it? What you need to change the file margo?

@DisposaBoy
Copy link
Owner

@rezzovskij See my previous comment #891 (comment)

@tooolbox
Copy link

@DisposaBoy Thanks for all the work you've done on GoSublime.

A point of feedback would be to change

press ctrl+.,ctrl+x to configure margo or check console for errors

To

to fix this, press ctrl+.,ctrl+x to configure margo or check console for errors

(It wasn't clear to me that that was what needed to be done until I found this ticket. Pressing those key combinations did the install and I was able to proceed.)

Otherwise I think this ticket can be closed, no?

@DisposaBoy
Copy link
Owner

@tooolbox I'll take a look when I get a chance. The error message can be improved, but I also think it's a bug. We know ahead of time if the file is missing, so we should generate it by default instead of letting the compilation fail - I think that's how it's supposed to work/worked originally.

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

5 participants