Conversation
Creat a new top-level `refs/eka` where atoms will be published, directly under `refs/eka/atoms`. Meta-data references like the origin commit and the manifest are published under a new `refs/eka/meta`.
requires removing progress rendering for the time being, as there appears to be a type mismatch from gix and prodash progress types making it impossible
Instead of searching for a toml in a parent directory, expect a generic file named atom.toml to indicate the root of the atom and its content to simplify publishing and the overall format.
Helps the user quickly make new atoms on the file-system
a5c1478 to
eda575e
Compare
the overloaded id becomes a tag (for unicode portion), and remains id for the cryptographic identity portion. Requires updates throughout the codebase for consistency, as well as fixes to tests. Also includes doc test fixes from previous doc updates.
The `gix::Url` implementation of the `QueryStore` is markedly more efficient than other implements, as it does not require a local repository and does not fetch any git objects. It leverages low-level transport and handshake primitives to make the operation as efficient as possible to enable high speed querying of many repositories efficiently.
Using the new `QueryVersion` struct, make it possible to query a remote for an atom, retrieve it's semver typed Versions, and determine the highest version matching a `VersionReq`.
reworks the QueryStore api to take a transport to be able to reuse the TCP connection to a git store, speeding up subsequent queries. Also implements some initial status reporting in the publish command.
The new `^^` denotes that the remainder of the string refers to a git ref name. Could be a partial name like master, or a full name like refs/heads/main. For convenience, user configured aliases work with these urls as well.
Many of the doc strings contain examples using crates that are not present with minimal features. There is no convenient way to disable these conditionally, so we will just not run them in CI, for now.
update some actions to get it working
Ensure the requested atom actually exists on the remote, and if the requested version matches, add it to the manifest. Currently the lock file entry is resolved as well, but only printed to stdout as a demo.
Ensure the manifest serves as the single source of truth by scrubbing the lockfile of any keys which are not present in the manifest before process new additions. Writing of the manifest and lock are kept atomic using a tempfile to ensure tight synchronization on the filesystem.
For those atom's which are not being removed, and are not being requested, we just need to make a pass that their VersionReq in the manifest has not fallen out of alignment with the lock. If it has, in order for the lock to remain always consistent, we need to re-resolve them. For those atoms in the manifest but not the lock, we also need to ensure they are resolved to ensure the lock and manifest are always syncrhonized. This change introduces this logic, when coupled with the sanitization logic of previous changesets, this essentially completes manifest/lock syncrhonization on each call to `eka add`.
At some point we will introduce more minor features. However, git integration should honestly be a first class citizen of the code, and trying to segregate it has become an undo maintenance burden.
It is crucial to ensure that changes to the manifest and lock-file remain in sync. For this reason we shall encapsulate all the logic and type-level guarantees which ensure this in a tightly controlled strut which holds them all together and enforces the necessary invariants.
Make some critical refinements to the public API, mainly that dependencies on the manifest and lockfile struct are not public to the outside world so that modifications can only be made through the proper interfaces which ensure they remain in sync. Also refine the documentation up to the crate standard, and focus on updating ADR #2 with details from the actual implementation which has now diverged significantly from the original plan.
|
So this has turned into a massive changeset, which I guess can be inevitable in early iteration and development. However it has reached a critical state where atom resolution and manifest/lock synchornization are fully implemented and working for atoms. There is still the outstanding concern of legacy pin dependencies. While important for practical usability, atoms are the main innovation here, and so I think their full completion warrants a good stopping point for this PR. We can focus on implementing Pin resolution in future, hopefully smaller, PRs. However, this merging marks a critical and important step (to be outlined in a forthcoming roadmap); atoms are now fully proven conceptually. They are publishable, evaluable (though the cli entrypoint to enable that is still pending, one can call atom-nix manually), and now resolvable (crucially, with full manifest/lock synchronization). Even though there is work remaining to make them easy to pick up and use in the existing Nix ecosystem, this marks a hallmark milestone, and so we are just going to go ahead and merge this branch before it gets any more unwieldy. |
related to and required by:
nrdxp/atom#42