Repository navigation
v0.3.0
A module can now carry the toolchain it needs, and a task can explain itself.
Until now a module could publish functions and types but not the environment they run in, so a module driving Terraform against AWS was unusable without an image nobody could ship. And finding out what a task took as arguments meant reading its source. v0.3.0 closes both.
Distributable modules
- Environments travel with the module.
#dockergains a recipe form —#docker(dockerfile = "infra/Dockerfile", context = ".")— so a module ships the Dockerfile for its toolchain inside its own hash-pinned tree. Registry references now require a tag or digest. - Nothing is built implicitly. Images are content-addressed by recipe hash and materialized only by
lask deps syncorlask env build. ARUNline is arbitrary code, so no implicit path may reach one. - Intent and resolution are separate files.
dependencies.lask.jsonbecomeslask.jsonand records only where a dependency comes from;lask.lock.jsonrecords the resolved graph, transitive dependencies included, and is now required. What a project executes can be read from the project. - References are pinned and checked. Tags resolve to commit SHAs, a repointed tag is
E-MODULE-REV-MOVED, and a project file that disagrees with the lock isE-MODULE-LOCK-STALE. - Dependencies live in the project. The cache moves to
.lask/deps, so a copied project works offline. - New commands.
lask deps sync|add|diff|why,--frozen, andlask env build|list. - Visibility.
export/internalmark declarations, with omission meaningexport.export { a } from "path"re-exports declarations rather than values, so keyword arguments survive. An external import reaches only a tree's entry module, so a public API spanning files is re-exported frommain.lask.
Help and documentation comments
- A documentation comment above a declaration supplies a summary, a description, and
@param/@return/@example/@hidden. lask run <function> --helpprints the signature, the doc comment, each default value, and the environments the function reaches. With no function name it lists everything the module offers, so a repository's tasks are discoverable without reading the source.- Default values are shown as source text and never evaluated; the default of a
!!parameter is shown as<secret>. lask envs <function>is now limited to that function's call graph instead of enumerating the whole module.
Breaking changes
remote,#env,environments.lask.json,--env-fileand--ssh-*are removed. A host cannot be pinned, carries state between runs, and admits no boundary; reach one withsshinside a pinned image instead.dependencies.lask.jsonis renamed tolask.json, and a committedlask.lock.jsonis required. Ahashkey left in an existing project file is accepted and ignored, so nothing has to be edited by hand.- An external import naming a path inside a dependency tree is rejected.
- Registry image references without a tag or digest are rejected.
lask inferis removed.run/evalhelp is where a user reaches for a type now; type inference itself is untouched.
Fixes
- The lock was only required to cover the project file, not to agree with it, so a reference edited in place left the pinned content behind unnoticed.
checknow compares both. deps syncshort-circuited on a cache hit keyed by content hash, so a changedrevover an unchangedhashnever re-fetched. A reference differing from the locked one now forces a fetch, surfacing the drift asE-MODULE-HASH-MISMATCH.
Full Changelog: v0.2.0...v0.3.0