cli/manifest: add manifest and lock data model#1305
Open
bigbes wants to merge 2 commits into
Open
Conversation
Introduce cli/manifest, the data layer for tt packages: Go types for the manifest (app.manifest.toml) and lock (app.manifest.lock), TOML read/write, structural validation, format-version handling and manifest_hash. No git, no dependency resolution, no .rocks/ - only the standard library and the TOML library. * Manifest/Package/Platform with the platform constraint parsed into semver part and [ce]/[ee] flavor (Constraint via TextMarshaler). * Dependency decodes both the short (bare constraint string) and long (table) forms from one map via go-toml's unstable.Unmarshaler. * Lock serializes to the [lock.products.<name>] table tree through an internal wire struct (go-toml does not split dotted struct tags). * Validate() does structural checks; format-version rules split unknown fields (warn on newer minor, fail otherwise, refuse newer major) from unknown enum values (always fail). manifest_hash is SHA-256 of the raw file bytes. Closes TNTP-8220
a9110ef to
ab294f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce cli/manifest, the data layer for tt packages: Go types for the manifest (app.manifest.toml) and lock (app.manifest.lock), TOML read/write, structural validation, format-version handling and manifest_hash. No git, no dependency resolution, no .rocks/ - only the standard library and the TOML library.
Closes TNTP-8220