Skip to content

cmd/compile: error positions are verbose in cgo-using files #20628

@aclements

Description

@aclements

What version of Go are you using (go version)?

go version devel +11c61eb6af Fri Jun 9 04:38:37 2017 +0000 linux/amd64

What did you do?

Build a file that imports "C" and has compile errors in it.

What did you expect to see?

Go 1.8 printed out succinct error messages that were the same whether or not the package imported "C". Eg.,

$ go build
./model.go:89: invalid operation: i < n (mismatched types int and C.uint)

What did you see instead?

At tip, the error positions are much more verbose and include a reference to a temporary path generated by the cgo tool that doesn't even exist after the go tool exits:

$ go build
./model.go:89[/tmp/go-build298567481/github.com/aclements/go-z3/z3/_test/_obj_test/model.cgo1.go:110:25]: invalid operation: i < n (mismatched types int and _Ctype_uint)

/cc @griesemer @mdempsky

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions