Giter Site home page Giter Site logo

Comments (13)

tompave avatar tompave commented on May 14, 2024 2

No, I couldn't get it to work.

from go-pry.

barrio avatar barrio commented on May 14, 2024 2

I confirm recompiling and installing doesn't fix it on ubuntu bionic with go 1.10.4.

from go-pry.

tompave avatar tompave commented on May 14, 2024

The same happens when running it inside a project with proper import and pry.Pry() call in the main.

from go-pry.

d4l3k avatar d4l3k commented on May 14, 2024

That's an interesting error. Is $GOPATH set?

from go-pry.

d4l3k avatar d4l3k commented on May 14, 2024

/ can you paste the output from go env ?

from go-pry.

tompave avatar tompave commented on May 14, 2024

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.

d4l3k avatar d4l3k commented on May 14, 2024

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.

tompave avatar tompave commented on May 14, 2024

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.

Asafb26 avatar Asafb26 commented on May 14, 2024

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.

d4l3k avatar d4l3k commented on May 14, 2024

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.

mitch-seymour avatar mitch-seymour commented on May 14, 2024

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.

tompave avatar tompave commented on May 14, 2024

Thanks @mitch-seymour. Installing with -i fixed it for me too.

from go-pry.

kalashnikovisme avatar kalashnikovisme commented on May 14, 2024

Installing with -i didn't fix my problem :(

from go-pry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.