Comments (13)
No, I couldn't get it to work.
from go-pry.
I confirm recompiling and installing doesn't fix it on ubuntu bionic with go 1.10.4.
from go-pry.
The same happens when running it inside a project with proper import and pry.Pry()
call in the main
.
from go-pry.
That's an interesting error. Is $GOPATH set?
from go-pry.
/ can you paste the output from go env
?
from go-pry.
Hi, thank you for the quick answer. Sure.
Here it is.
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/Tom/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/Tom/source/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/mw/hh951k897lv1c8nchgxyy9zw0000gp/T/go-build188710889=/tmp/go-build -gno-record-gcc-switches -fno-common"
I can also confirm that go-pry
was available in $GOPATH/bin/go-pry
.
Also:
$ go version
go version go1.10.1 darwin/amd64
I installed go using the macOS installer from golang.org, and I'm running it on macOS 10.13.4.
from go-pry.
Might try and run go get -u github.com/d4l3k/go-pry
.
I'm having a hard time reproducing it on Linux and don't have a mac. We could setup a time for me to remote in
from go-pry.
Might try and run
go get -u github.com/d4l3k/go-pry
.
I've tried that. It got correctly recompiled but the problem persists:
$ go-pry -i="fmt,math,strconv"
panic: failed to TypeCheck: /var/folders/mw/hh951k897lv1c8nchgxyy9zw0000gp/T/pry768038902/main.go:3:2: could not import github.com/d4l3k/go-pry/pry (can't find import: "github.com/d4l3k/go-pry/pry")
goroutine 1 [running]:
github.com/d4l3k/go-pry/pry.Apply(0xc4200ce200)
/Users/Tom/source/go/src/github.com/d4l3k/go-pry/pry/pry.go:86 +0x228
main.main()
/var/folders/mw/hh951k897lv1c8nchgxyy9zw0000gp/T/pry768038902/main.go:10 +0x3f4f
exit status 2
I'm having a hard time reproducing it on Linux and don't have a mac.
Do you know if any other mac user has the same problem? i.e. go-pry
doesn't work on macOS?
I'm asking because since I opened the issue I changed my go installation: I moved from the golang.org
installer to a package manager (for reasons unrelated to this issue). Since the problem is still there, I wonder if it's just a macOS thing.
We could setup a time for me to remote in
Thanks for the offer :-), but I don't think it's necessary.
from go-pry.
happens to me too, also on mac.
did you manage to make pry.Pry() works? Its looks like it ignore this line at all
from go-pry.
If you try putting a simple go file in one of the user temporary directories /var/folders/mw//T/ does it work?
package main
import "github.com/d4l3k/go-pry/pry"
func main() {
pry.Pry()
}
Run with go run main.go
Might also try moving your go
directory to be in your home folder. Ex /Users/Tom/go
.
If one of those works it'll help me figure out what the cause might be. I suspect there's something weird going on with passing the environment variables on macOS. If just ~/go
works that's likely it (since go now automatically sets the GOPATH if not present to be ~/go
).
from go-pry.
I had the same issue running go-pry
on macOS. Adding the -i
flag to the go install
command resolved it for me. I opened a PR that updates the install instructions in the README (see #56). cc/ @tompave @d4l3k
from go-pry.
Thanks @mitch-seymour. Installing with -i
fixed it for me too.
from go-pry.
Installing with -i
didn't fix my problem :(
from go-pry.
Related Issues (20)
- IDE integration HOT 1
- String concatenation doesn't seem to work? HOT 1
- Installation of go-pry HOT 2
- Unable to create array of set length HOT 3
- cannot find package "foo" HOT 8
- Access to unexported HOT 1
- How about adding debug commands such likes continue or run? HOT 7
- Installation problem from go get HOT 2
- It Doesnโt Work When Using Alongside Gin HOT 2
- Can't Print Variable HOT 1
- assignment count mismatch: HOT 1
- go-pry> panic: rpc: can't find service RPC.RPC_auto_complete HOT 4
- How to use go-pry in chrome ? HOT 4
- panic: failed to TypeCheck HOT 1
- seems like Doesn't Support Go 1.11 Go Module HOT 5
- Working with Echo
- Consider gomacro HOT 1
- Parsing errors HOT 1
- integrate with https://github.com/go-rod/rod
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 go-pry.