Skip to content

Document the compatible logos-package-manager pin for tutorial-v1 #39

@fryorcraken

Description

@fryorcraken

Problem

The tutorial markdown files currently invoke lgpm unpinned:

nix build 'github:logos-co/logos-package-manager#cli' --out-link ./pm

Running that today resolves to lgpm master HEAD (commit 9101875b, PR #10 "implement uninstall, dependencies and dependents resolution"), which — together with the earlier PR #8 "Add package signature and validation" — requires content hashes in the .lgx manifest.

logos-module-builder tag tutorial-v1 (commit 46a51e5f) — the version the tutorial pins downstream projects to — does not populate those content hashes. As a result, the tutorial's own lgpm install step fails with:

Installing from file: .../logos-calc-module-lib.lgx... FAILED
Error: Package validation failed: Missing content hashes in manifest

Reproduce

In a tutorial module (e.g. the calc-module tree, or logos-module-tictactoe):

nix build .#lgx
nix build 'github:logos-co/logos-package-manager#cli' --out-link ./pm
./pm/bin/lgpm --modules-dir ./modules install --file result/*.lgx
# → Error: Package validation failed: Missing content hashes in manifest

What works

logos-package-manager has a tutorial-v1 tag at commit e5c25989861f4487c3dc8c7b3bc0062bcbc3221f (the last pre-validation commit, before PR #8). Using that pin, the lgpm install step succeeds against .lgx files built with module-builder tutorial-v1.

Verified end-to-end against logos-module-tictactoe via logos-scaffold basecamp install:

# Works
github:logos-co/logos-package-manager/e5c25989861f4487c3dc8c7b3bc0062bcbc3221f#cli

# Fails with "Missing content hashes in manifest"
github:logos-co/logos-package-manager#cli                     # master HEAD (9101875b)
github:logos-co/logos-package-manager/8110734252ed#cli        # PR #8 — also fails (this is the PR that ADDED validation)

Side note: the tutorial's own flake.lock files (in logos-calc-module/, logos-calc-ui/, logos-calc-ui-cpp/) pin lgpm at 8110734252ed (PR #8), which is also incompatible — so the lock is stale relative to what tutorial-v1 module-builder actually emits.

Ask

Update the tutorial to pin lgpm explicitly to the tutorial-v1 tag (or the current compatible commit) in:

  1. The markdown snippets, e.g.
    nix build 'github:logos-co/logos-package-manager/tutorial-v1#cli' --out-link ./pm
  2. The sub-project flake.lock files, via nix flake update logos-package-manager after adjusting the input URL.

If the long-term plan is for module-builder to start emitting content hashes (and tutorial projects to use a newer lgpm), noting that timeline in the docs would also help downstream tooling know when to bump pins.

Context

This surfaced via logos-scaffold (logos-scaffold-basecamp feature branch) which wraps nix build + lgpm install for per-profile module dogfooding. Scaffold now pins DEFAULT_LGPM_FLAKE to the same tutorial-v1 commit as a workaround, but the tutorial is the authoritative source of truth for which lgpm rev should go with which module-builder rev, so the pin really belongs there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions