Skip to content

emit xpkg: a universal self-contained package's entry names every system with every image architecture, not the loaders it carries #860

Open

Description

@Sunrisepeak

What happens

mcpp emit xpkg --package for a universal package (mcpp pack --mode self-contained --systems linux,macos,windows) writes one block per system, each with every image architecture: archs = {"aarch64", "x86_64"} and a single sha256 for linux, macosx and windows (src/pack/distribution.cppm, the universal branch of the entry writer).

The package carries a loader only for the systems in its mcpp-package.json systems (libexec/okrun/<os>-<arch>/). For mcpp-ide 0.1.0 those are linux-x86_64, linux-aarch64, macos-aarch64 and windows-x86_64. On any other pair, the launcher (bin/mcpp-ide, bin/mcpp-ide.cmd) falls back to okrun on PATH. pkgs/o/okrun.lua is built for the same four pairs. So on an Intel Mac or a Windows arm64 machine, xlings installs the entry and the program does not start.

Expected

For a self-contained universal package, each system's block names only the architectures whose loader the package carries (systems, with macos written as macosx), as per-architecture entries. A package that depends on the runner (another mode, deps = { "xim:okrun" }) has no such information and keeps every image architecture.

Where it was found

The ecosystem review of the mcpp-ide 0.1.1 index entry (openxlings/xim-pkgindex, branch mcppls-0.0.19-mcpp-ide-0.1.1). That entry now restricts macOS to aarch64 and Windows to x86_64 by hand. The fix in the emitter lets a regenerated entry say the same.

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions