Skip to content

Releases: livetribe/yama

v0.5.0

Choose a tag to compare

@maguro maguro released this 18 Sep 19:28

An alpha release. The API can still change before v1.0.

Breaking

  • Yama now requires Go 1.26 or later. The go line in go.mod is 1.26.0. An application on Go 1.25 must upgrade Go before it upgrades Yama.

Fixed

  • Vulnerable dependencies. golang.org/x/mod moves to v0.41.0 and golang.org/x/text moves to v0.42.0. These versions fix GO-2026-6179, GO-2026-6180, and GO-2026-5970. govulncheck found no call from Yama to the affected code.

New

  • A security policy. SECURITY.md states how to report a vulnerability through GitHub private vulnerability reporting.

Changed

  • golang.org/x/tools moves to v0.50.0.

Full changes: v0.4.0...v0.5.0

v0.4.0

Choose a tag to compare

@maguro maguro released this 18 Sep 18:26

An alpha release. The API can still change before v1.0.

Breaking

  • yama.Option is now a function type. It was an interface with one method. Code that builds options with WithInterceptors, WithBeginComponents, and WithEndComponents needs no change. Code that named the Apply method does.

New

  • The closer directive. A //yama:closer comment in the doc comment of a provider's declaration closes the component in the teardown pass. Yama wraps the component in a Stopper that calls Close. The call runs under the pass context and through the Stop interceptors. This is for a type from a package you do not own, such as *sql.DB.

    // NewDB provides the database handle.
    //
    //yama:closer
    func NewDB(cfg Config) (*sql.DB, error) {
    	return sql.Open(cfg.Driver, cfg.DSN)
    }

    A wire.Struct entry has no declaration, so its directive goes on the entry in the wire.NewSet call.

  • A warning for a closer that nothing closes. A run prints one line on standard error for a component that implements io.Closer and has no directive, no cleanup, and no Stop. The warning does not stop generation.

  • The noclose directive. A //yama:noclose comment states that the lifecycle does not close the component, and it stops the warning.

See the guide and ADR-016.

Changed

  • A run names its backup files with a .bak suffix, not a leading dot. A directory listing now shows what an interrupted run left behind.
  • Regenerate after you upgrade. Generated code calls rt.AsStopper for a closer component, so the yama tool and the l7e.io/yama module must be the same version.

Full changes: v0.3.0...v0.4.0

v0.3.0

Choose a tag to compare

@maguro maguro released this 18 Sep 18:30

The first alpha of the lifecycle-orchestration rewrite. The API can still change before v1.0.

This is a green-field rewrite. It shares only a name and a repository with the signal watcher released as v0.1.0 and v0.2.0. The module path is l7e.io/yama.

What it is

Yama is a compile-time lifecycle framework. It reads the dependency graph that Google Wire builds, and it generates the code that starts, quiesces, and stops the application's components in dependency order. No runtime engine interprets a plan.

What this release holds

  • The yama command. It runs Google Wire, reads the injector that Wire writes, and writes lifecycle_gen.go. Its flags and its package-pattern argument are the same as wire gen's.
  • Lifecycle stubs. A file behind the yamainject build tag names each constructor that the application calls, and the providers that build its graph.
  • Three capabilities. A component takes part in a pass when its type implements Starter, Quiescer, or Stopper. A Google Wire cleanup function keeps its place in the teardown.
  • Ordering. Components start in dependency order. They quiesce and stop in reverse. Components with no dependency relation run at the same time.
  • Startup failure. Startup is fail-fast. Yama rolls back what started, runs every cleanup, and returns ErrStartFailed.
  • Interceptors and boundary components, through WithInterceptors, WithBeginComponents, and WithEndComponents.
  • RunUntilSignal, which runs a lifecycle until a signal or a context cancellation.

See the README, the guide, and the ADRs.

This release was recreated on 2026-09-18 from the v0.3.0 tag of 2026-08-27. The tag did not change.