@imp/rules/workflows/lockfiles
Module: @imp/rules/workflows/lockfiles.
GEN_LOCKFILES
Documentation is not yet available for this implementation export.
Source: rules/workflows/lockfiles/index.luau:410.
builtin_lockfiles()
The registered builtin lockfile specs, in registration order.
Source: rules/workflows/lockfiles/index.luau:389.
encode_lock(lock, platform_orders)
Encode a lock { tool, versions } as the JSON text of a lockfile.
Versions are sorted. The platforms of each version follow
platform_orders[version] (a list of os/arch keys), and other
platforms follow, sorted. The entry fields are url, artifact, size,
and sha256, and other fields follow, sorted. The text uses two-space
indentation and ends with a newline.
Source: rules/workflows/lockfiles/index.luau:124.
generate_builtin_lockfile(spec)
Declare the regeneration of a builtin lockfile to exactly its registered
versions. The task does not keep the existing contents. It resolves to
{ lock, path, lockfile }, as graph_generate_tool_lockfile does.
Source: rules/workflows/lockfiles/index.luau:405.
graph_gen_lockfiles_goal(roots)
Check each selected GEN_LOCKFILES root, then write its lockfile into
the workspace. A root is a graph_generate_tool_lockfile result, or a
Python project lock { kind = "python-project-lock", project, path, lockfile }.
Each root merges with the lockfile that it read when the graph was declared. Thus two roots that write the same lockfile cannot both keep their versions, and the goal fails before it writes a file.
Source: rules/workflows/lockfiles/index.luau:344.
graph_generate_tool_lockfile(options)
Declare the lockfile regeneration of one toolchain version as a graph
root for the GEN_LOCKFILES slot.
Options:
version Toolchain version to lock.
name Tool name. It is the lockfile tool field.
platforms Published platforms, a list of { os, arch }.
download_url function(version, plat) that returns the artifact URL.
artifact_name function(version, plat) that returns the artifact
filename.
lockfile Optional lockfile address, for example
"@imp/rules/zola/zola.lock". The default is
@workspace/<name>.lock.
The task keeps the other versions that the lockfile has. It resolves to
{ lock, path, lockfile }: the lock contents, the workspace path, and the
written lockfile artifact.
Source: rules/workflows/lockfiles/index.luau:310.
register_builtin_lockfile(spec)
Register the shipped lockfile of a toolchain. Each toolchain module calls
this function one time when it loads. spec has the options of
graph_generate_tool_lockfile without version, and versions, the
list of versions that the lockfile pins. The lockfile address is
necessary. Regeneration writes exactly these versions.
Source: rules/workflows/lockfiles/index.luau:378.
register_toolchain_lockfile(spec, versions)
Register the builtin lockfile of a toolchain with versions, and return
spec for the graph_generate_tool_lockfile root of the toolchain.
Source: rules/workflows/lockfiles/index.luau:395.