Good thought. Even after git clean -fdx, though, the branch change-243945 
fails with the dwarf-related errors, and with go1.15.2 + cherry-picked 
95a456f I get this:

/Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/pkg.go:404:22: 
pp.EmbedPatterns undefined (type *build.Package has no field or method 
EmbedPatterns)
/Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/pkg.go:405:26: 
pp.TestEmbedPatterns undefined (type *build.Package has no field or method 
TestEmbedPatterns)
/Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/pkg.go:406:27: 
pp.XTestEmbedPatterns undefined (type *build.Package has no field or method 
XTestEmbedPatterns)

followed by the missing _go_.a above. (It's possible this was in the 
previous error as well, and I just forgot to paste it, sorry.)

I think the problem is with the cherry-pick — I was expecting the top-level 
commit to contain the complete prototype, but it doesn't; there's probably at 
least six commits 
<https://go-review.googlesource.com/q/message:%2522DO+NOT+REVIEW+/+Prototype+for+golang.org/s/draft-embed-design'%2522>
 
I need, if not everything in the relation chain of the top-level commit. 
I'm not sure what the best way to apply all those is — I guess I can try 
one at a time and see what happens.

Boy howdy do branches and pull requests seem easier. But I assume this 
makes sense to experienced Gerrit users.

On Thursday, October 8, 2020 at 3:57:49 PM UTC-7 Ian Lance Taylor wrote:

> On Thu, Oct 8, 2020 at 3:46 PM David Moles <[email protected]> wrote:
> >
> > I'm trying to build the prototype code for the embedded static assets 
> proposal, but I'm not having any luck. I'm new to building Go from source, 
> and new to gerrit and to the Go contribution & development process, so 
> apologies in advance if I'm missing something obvious.
> >
> > I've cloned the Go source and applied the change with
> >
> > git fetch https://go.googlesource.com/go refs/changes/45/243945/2 && 
> git checkout -b change-243945 FETCH_HEAD
> >
> > but when I try to build with src/all.bash (using either go 1.15.2 or go 
> 1.14.9, on macOS Catalina), I get:
> >
> > /Users/david/Projects/Scratch/goroot/src/cmd/internal/obj/dwarf.go:49: 
> s.Func.Text undefined (type func() *FuncInfo has no field or method Text)
> >
> > followed by a bunch of similar errors. (Note that neither dwarf.go nor 
> funcinfo.go are involved in the prototype patchset.)
> >
> > Figuring the tree might have been in a broken state at the time the 
> prototype was committed, I then tried cherry-picking the commit (95a456f) 
> on top of the go1.15.2 release tag. This got me past the error above, but 
> the build then failed with:
> >
> > go tool dist: FAILED: 
> /Users/david/Projects/Scratch/goroot/pkg/tool/darwin_amd64/compile -std 
> -pack -o 
> /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/load/_go_.a
>  
> -p cmd/go/internal/load -importcfg 
> /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/load/importcfg
>  
> /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/flag.go 
> /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/path.go 
> /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/pkg.go 
> /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/search.go 
> /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/test.go: exit 
> status 2
> > go tool dist: open 
> /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/modfetch/codehost/_go_.a:
>  
> no such file or directory
> > go tool dist: open 
> /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/load/_go_.a:
>  
> no such file or directory
> > go tool dist: open 
> /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/version/_go_.a:
>  
> no such file or directory
> >
> > I assume that I'm doing this wrong, and that there's a right way to be 
> doing it -- what is the right way?
>
>
> These errors look like you have some mix of old and new sources. Make
> sure to start with an empty directory, with no files left over from
> earlier changes.
>
> Ian
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a764df66-d697-449b-88cb-8c4357f6ef6en%40googlegroups.com.

Reply via email to