• v2.1.1 f9c4a98019

    v2.1.1 Stable

    michael released this 2026-09-20 20:11:10 +02:00 | 9 commits to main since this release

    New

    • daw_i18n/v1 language resources: i18n/en.json (canonical) and
      i18n/de.json, 30 resources in total. Every error construction site
      now carries its own resource_id (init.lua 3, ip_utils.lua 15,
      http_client.lua 12). Error codes are unchanged.

    Changed

    • Bootstrap case: if daw.common.error itself is unreachable, all
      modules now return the reserved daw_error/v1 sentinel
      (id = "daw-error-facility-unavailable", with resource_id) instead
      of a plain "[ERROR] ..." string. This removes the one documented
      exception to the error contract.
    • http_client: a connection failure now has the message
      request failed; the raw LuaSocket error text moved to
      err.data.detail. The code (connection_failed) and the method /
      url data fields are unchanged.
    • Stub messages: the facade stub in init.lua now reads
      <name> submodule not available (the load error is in
      err.data.detail); the dependency stub in http_client reads
      http_client unavailable: required dependency <name> is missing and
      carries err.data.dependency.

    Fixes

    • http_client: the dependency stub (missing socket.http, ltn12 or
      daw.common.json) returned the error object as its first value
      instead of nil, err, so a caller checking if not result treated
      the error as a result. It now returns nil, daw_error/v1.
      See DAW/daw-lua-net#12.

    Internal

    • http_client.lua: request() now builds its daw_error/v1 where
      each failure is detected; get / post / put just return
      request(...).
    • Makefile: removed the obsolete install / uninstall targets. The
      module is shipped as a git submodule in lib/daw/net/
      (DAW/daw-lua-net#13).
    • README.md: Contributing section aligned with the GitHub Issues
      policy (DAW/daw-lua-net#11); the error-contract section describes the
      sentinel.
    • Test suite: 64 -> 66 tests.

    Migration

    Only code that inspects error text or the bootstrap string needs
    changes: a check for the old plain "[ERROR] ..." fallback string,
    message:find(...) on the raw LuaSocket text (now
    err.data.detail), or matching the old stub messages. Code that only
    checks if err then or err.code is unaffected.

    Requires daw-lua-common >= 2.1.0. resource_id is set on errors built
    through daw.common.error only with a daw-lua-common release that
    supports opts.resource_id; with 2.1.0 the field is accepted and
    ignored (the sentinel objects carry it directly).

    See DAW/daw-lua-net#10.

    Downloads