Helper fails to compile with Go 6898:a5eebdd09522

Bug #687716 reported by Russel Winder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SCons Go Tools
Fix Released
Critical
Ross Light

Bug Description

I just pulled to the latest tip and tried to compile the helper to install it (initially on Ubuntu Maverick AMD64 then on Mac OS X Snow Leopard i386, but on Maverick I got:

helper.go:141: cannot use fname (type string) as type *token.FileSet in function argument
helper.go:141: cannot use nil as type string in function argument
helper.go:141: not enough arguments to function call
**Compile failed

Revision history for this message
Russel Winder (russel) wrote :

It seems that the go.parser.ParseFile signature was changed in 6791:39e56a806cdc of the Go repository: it is now a four parameter function where it was a three parameter function.

I have taken a local branch of my mirror branch and will see if I can deduce or infer a suitable parameter to put in.

Revision history for this message
Russel Winder (russel) wrote :

Just for clarification, it is the SCons Go branch that I have taken a local branch of.

Revision history for this message
Russel Winder (russel) wrote :

Putting in a brand new FileSet cures the API usage problem and allows a build and install of the helper, but it is not entirely clear if this is the right thing to do.

|> bzr diff
=== modified file 'helper.go'
--- helper.go 2010-09-08 16:08:51 +0000
+++ helper.go 2010-12-09 13:02:00 +0000
@@ -138,7 +138,7 @@
  go func() {
   defer close(ch)
   for _, fname := range flag.Args() {
- fileNode, err := parser.ParseFile(fname, nil, 0)
+ fileNode, err := parser.ParseFile(token.NewFileSet(), fname, nil, 0)
    if err != nil {
     fmt.Fprintf(os.Stderr, "Error parsing %s: %v\n", fname, err)
     if fileNode == nil {

Revision history for this message
Ross Light (quartz25) wrote :

Thanks, Russel! Committed in r30.

Changed in sconsgo:
importance: Undecided → Critical
status: New → Fix Released
assignee: nobody → Ross Light (quartz25)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.