rules/imp/lockfile/index.js

Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.

lockfileAddressToPath()

lockfileAddressToPath(address)

Convert a lockfile address (//a/b.lock) to a workspace-relative path (a/b.lock) — where gen-lockfiles writes it.

ParameterTypeDescription
addressstring

Returns: string

shaToolName()

shaToolName(plat)

Name of the SHA-256 checking native tool for a platform — sha256sum everywhere it's stock (linux; windows via Git-for-Windows sh, the same environment the curl/tar scripts already assume), shasum on macos.

ParameterTypeDescription
plat{ os: string }

Returns: string

lockedDownloadTools()

lockedDownloadTools(plat)

Native-tool names the lockedDownloadArgv script needs — the sandbox is fully hermetic, so even bare coreutils must be declared tools. Bare sh only auto-resolves on unix, so it is declared on windows only (same convention as the toolchain coreToolNames lists).

ParameterTypeDescription
plat{ os: string }

Returns: string[]