Skip to content

cmd/go: internal package import not allowed from within the standard library #75511

@FiloSottile

Description

@FiloSottile

For a new version of CL 703015 I tried importing internal/syscall/windows from the new crypto/internal/fips140/entropy package.

I expected that to work according to https://pkg.go.dev/cmd/go#hdr-Internal_Directories, since crypto/internal/fips140/entropy is in the tree rooted at the parent of internal/, which should be the whole standard library.

Instead (building with GOOS=windows):

# crypto/internal/fips140test
package crypto/internal/fips140test (test)
        imports crypto/internal/fips140/entropy
        src/crypto/internal/fips140/entropy/now_noasm.go:10:2: use of internal package internal/syscall/windows not allowed
FAIL    crypto/internal/fips140test [setup failed]
FAIL

/cc @golang/compiler

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions