gvisor/tools
Rahat Mahmood 507f997213 go-marshal: Improve collision detection of import statments.
Previously, the import statement collision detection mechanism aborted
go-marshal whenever it detected two imports in any package that has
the same local name. Consider this trivial package, defined by the the
following two source files:

file1.go:

package example
import (
        path/a/to/foo
)
...

file2.go:

package example
import (
       another/package/with/final/component/foo
)
...

Go-marshal previously couldn't handle generating code for the the
above package, even if none of the types marked for marshalling used
either of the imported foo packages. This turns out to be too
restrictive as we run into this a lot in practice. Examples include
"encoding/binary" vs "gvisor/pkg/binary/binary", and "sync" vs
"gvisor/pkg/sync/sync".

This change allows go-marshal to proceed with marshalling, and only
abort if the code generated by go-marshal references any such
ambiguous import names.

PiperOrigin-RevId: 304131190
2020-04-01 00:43:55 -07:00
..
bazeldefs Statically link libpthread for static c++ binaries. 2020-03-20 18:24:00 -07:00
bigquery BigQuery schema for benchmark-tools dashboard. 2020-03-30 13:05:45 -07:00
checkunsafe Update visibility. 2020-02-10 11:30:21 -08:00
go_generics Update visibility. 2020-02-10 11:30:21 -08:00
go_marshal go-marshal: Improve collision detection of import statments. 2020-04-01 00:43:55 -07:00
go_stateify Stateify: register types with full package names 2020-02-11 11:41:55 -08:00
images Internal change. 2020-03-30 10:44:55 -07:00
installers Fix apt-get reliability issues. 2020-02-27 15:36:13 -08:00
issue_reviver Standardize on tools directory. 2020-01-27 12:21:00 -08:00
tags Automatically propagate tags for stateify and marshal. 2020-02-04 14:37:39 -08:00
BUILD nogo: enable sanitizers. 2020-03-25 16:21:27 -07:00
defs.bzl Packetimpact in Go with c++ stub 2020-03-17 08:53:27 -07:00
go_branch.sh Fix typo in go_branch.sh script. 2019-11-25 13:53:27 -08:00
go_mod.sh Add ability to execute go.mod in gopath context. 2020-02-28 10:21:17 -08:00
image_build.sh kokoro: Add scripts to rebuild images. 2019-08-27 23:29:02 -07:00
make_repository.sh Fix repository build scripts. 2019-11-05 15:16:04 -08:00
nogo.json BigQuery schema for benchmark-tools dashboard. 2020-03-30 13:05:45 -07:00
tag_release.sh Use automated release notes, if available. 2020-02-27 10:22:41 -08:00
workspace_status.sh Standardize on tools directory. 2020-01-27 12:21:00 -08:00