Show info for packages that aren't installed
Rolling Release / build (push) Successful in 1m49s
Rolling Release / publish (push) Successful in 8s

- `orbit info` finds a package that isn't installed, or a `channel::` / `@constraint` build, in the cached channel listings used by search
- Channel indexes record each version's manifest digest, so a repeated info needs no network
- Versions without a digest, or indexes built before digests were added, are resolved in the registry
- Show the docs link, channel, digest, bins and dependencies for available builds
This commit is contained in:
nandi committed 2026-12-01 14:39:13 -08:00
1 parent 022898ed65
commit a00c87bf04
7 files changed
+176 -29

No files matched your search

+5 -4
View File
@@ -85,13 +85,14 @@ A channel can hold an index of its packages at `<channel url>/orbit-index:latest
The manifest has `artifactType` `application/vnd.latha.orbit.index.v1` and one JSON layer (`application/vnd.latha.orbit.index.v1+json`):
```json
{"packages":[{"name":"mytool","version":"1.4.0","description":"...","versions":["1.4.0"]}]}
{"packages":[{"name":"mytool","version":"1.4.0","description":"...","versions":["1.4.0"],"digest":"sha256:..."}]}
```
- `orbit publish` adds the package to the index, and creates the index from the catalog if there is none. `--no-index` skips this.
- `orbit index [--channel <name>]` rebuilds it from the catalog. Use it after deleting a package, or if two publishes ran at once and one entry was lost. On a registry without a catalog, name the packages: `orbit index mytool othertool`.
- `digest` is the manifest digest of `version`. Indexes built before it was added lack it; `orbit index` adds it.
- Installs and version lookups never read the index, so a stale one can't change what is installed.
- Search keeps a copy of each channel's list in `~/.orbit/cache/indexes/` and uses it for an hour without touching the network. After that it fetches the list again, or uses the old copy with a warning if the registry can't be reached. `orbit search --refresh` fetches now. Your own `publish`, `index`, `login` and `logout` drop the copies they affect. A channel without an index is cached too, if it has at most 100 repositories.
- Search and `orbit info` keep a copy of each channel's list in `~/.orbit/cache/indexes/` and use it for an hour without touching the network. After that it fetches the list again, or uses the old copy with a warning if the registry can't be reached. `orbit search --refresh` fetches now. Your own `publish`, `index`, `login` and `logout` drop the copies they affect. A channel without an index is cached too, if it has at most 100 repositories.
- The index is built with the publisher's login. On a registry where packages in one namespace can be private while others are public, a public index reveals the private names, descriptions and versions. Gitea sets visibility per owner, so this doesn't apply there.
## Usage
@@ -277,7 +278,7 @@ src/main/
model.mbt orbit.json / state.json / config.json (+ tests)
registry.mbt OCI registry ops: tags, resolve, cached manifests, fetch, publish, login
index.mbt channel index: build, publish, read (+ tests)
index_cache.mbt local copies of channel listings for search (+ tests)
index_cache.mbt local copies of channel listings for search and info (+ tests)
details.mbt package details shown by install and info (+ tests)
solver.mbt lazy Resolvo-style CDCL SAT solver & UNSAT explainer (+ tests)
ops.mbt SAT-backed global install/upgrade, remove/rollback/gc/search
@@ -307,5 +308,5 @@ Fixes needed for current MoonBit, kept here in case you build with an older comp
- There's no lock file for concurrent runs, and no install hooks, by design.
- `orbit gc` only preserves global current and rollback builds (run `orbit install` / `orbit sync` in a project to re-populate missing store entries from its `orbit.lock`).
- `orbit info <name>` reads installed package details (the project's, then the global ones) without contacting the registry. Use `orbit versions <name>` to check published versions.
- `orbit info <name>` reads installed package details (the project's, then the global ones) without contacting the registry. A package that isn't installed, or `orbit info [channel::]<name>@<constraint>` for another build, is looked up in the same cached channel listings as `orbit search`: it shows the newest version's description, documentation link, digest, bins, dependencies and conflicts. With the digest from the index and the config blob in the manifest cache, a repeated `info` needs no network; another version, or an index without digests, is resolved in the registry. Use `orbit versions <name>` to list published versions.
- `search` needs a channel index or the registry's catalog API (Gitea has it, also without a login). Otherwise use `orbit versions <name>`.