GithubHelp home page GithubHelp logo

Comments (3)

ZekeLu avatar ZekeLu commented on June 6, 2024 1

Yes, the old branch is the latest branch.

from pdlgen.

tmm1 avatar tmm1 commented on June 6, 2024

I used this hacky patch to get past the error:

diff --git a/gen/gotpl/util.go b/gen/gotpl/util.go
index e2dfce1..7f5554f 100644
--- a/gen/gotpl/util.go
+++ b/gen/gotpl/util.go
@@ -125,9 +125,10 @@ func ResolveRef(t *pdl.Type, d *pdl.Domain, domains []*pdl.Domain) (pdl.DomainTy                  
        // determine if ref points to an object
        var resolved *pdl.Type
        for _, z := range domains {
-               if dtyp == z.Domain {
+               if dtyp == z.Domain ||
+                       (dtyp == "cdp" && z.Domain == "DOM") {
                        for _, j := range z.Types {
-                               if z.Domain == "cdp" && shortRef == strings.ToLower(strings.SplitN(j.RawName, ".", 2)[1]) {
+                               if (z.Domain == "cdp" || dtyp == "cdp") && shortRef == strings.ToLower(strings.SplitN(j.RawName, ".", 2)[1]) {
                                        resolved = j
                                        break
                                } else if ref == strings.ToLower(j.RawName) {

But now I just get another error:

panic: could not resolve type cdp.frameid in domain cdp

goroutine 1 [running]:
github.com/chromedp/cdproto-gen/gen/gotpl.ResolveRef(0xc007de1262, 0xc007d36090, {0xc0000f4c00, 0x2d, 0xc007293248})
        github.com/chromedp/cdproto-gen/gen/gotpl/util.go:144 +0x2b4
github.com/chromedp/cdproto-gen/gen/gotpl.ResolveType(0x90, 0xc007d36090, {0xc0000f4c00, 0x14748e0, 0xc000080480})
        github.com/chromedp/cdproto-gen/gen/gotpl/util.go:161 +0x1f7
github.com/chromedp/cdproto-gen/gen/gotpl.GoType(...)

from pdlgen.

tmm1 avatar tmm1 commented on June 6, 2024

I guess its required to use the old branch?

from pdlgen.

Related Issues (9)

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.