Comments (5)
I am having the same issue. no workaround here?
from go-pry.
same question too.
from go-pry.
Is this project dead ?
from go-pry.
Unfortunately go modules aren't well supported by the standard library. Most of the modules/vendor implementation seems to be located in cmd/go and not exported as a usable library unlike the previous code.
As a work around you can use GO111MODULE=off
to disable modules.
I haven't had a ton of time to dig into better support for this, PRs / suggestions on how to support modules cleanly are welcome :)
from go-pry.
Took another pass at this and it's now working.
⋊> ~/D/just-go go mod init github.com/d4l3k/just-go 00:10:06
go: creating new go.mod: module github.com/d4l3k/just-go
go: to add module requirements and sums:
go mod tidy
⋊> ~/D/just-go go mod tidy 00:10:11
go: finding module for package github.com/d4l3k/go-pry/pry
go: found github.com/d4l3k/go-pry/pry in github.com/d4l3k/go-pry v0.0.0-20210726070227-12ce9461a069
⋊> ~/D/just-go go-pry -d run . 00:10:15
2021/07/26 00:10:22 generate.go:40: Prying into /home/rice/Developer/just-go/main.go
...
2021/07/26 00:10:22 generate.go:40: :: Found 1 pry statements.
starting debug....
From /home/rice/Developer/just-go/main.go @ line 11 :
6: "github.com/d4l3k/go-pry/pry"
7: )
8:
9: func main() {
10: fmt.Println("starting debug....")
=> 11: pry.Pry()
12: }
13:
[81] go-pry> fmt.Sprintf("asdf %d", 10)
=> "asdf 10"
[82] go-pry> exit
Reverting files
⋊> ~/D/just-go ls 00:10:35
go.mod go.sum main.go
⋊> ~/D/just-go cat main.go 00:10:39
package main
import (
"fmt"
"github.com/d4l3k/go-pry/pry"
)
func main() {
fmt.Println("starting debug....")
pry.Pry()
}
I had previously missed the fact that https://pkg.go.dev/golang.org/x/tools/go/packages exists. The old importer/build packages no longer wok and there's a new one instead. Switching to that resolved most of the issues w/ some work arounds on top.
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
- Is go-pry supposed to run standalone HOT 13
- 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
- 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.