Skip to content

x/tools/go/internal/gcimporter: position filename inconsistency for os/signal/internal/pty #44339

@mdempsky

Description

@mdempsky

In CL 292351, I added a test to compare cmd/compile's export data output against gcimporter.IExportData. Because cmd/compile generates paths prefixed with "$GOROOT" whereas go/loader generates them with the actual build.Context.GOROOT value, I included code to expand $GOROOT.

However, this turned out to break on the macOS machines, because for package os/signal/internal/pty (and only that package!) go/loader was using "/var/folders/..." but cmd/compile's expanded path became "/private/var/folders/...". The former is a symlink to the latter, so I submitted CL 292910 to workaround this special case.

But the toothrot builder is still unhappy (https://build.golang.org/?repo=golang.org%2fx%2ftools), now because of "/private/tmp" vs "/tmp" (and again, only for os/signal/internal/pty): https://build.golang.org/log/d0edf17481286f622c2764cf38ab1831375ccb94

I don't think the "/private" vs no-"/private" discrepancy is a big deal. They're semantically equivalent paths. But it's bizarre that os/signal/internal/pty is the only package affected by this.

One suspicion: I think os/signal/internal/pty is the only "internal" package that uses cgo?

/cc @findleyr @stamblerre

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions