Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft compact index documentation #362

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

martinemde
Copy link
Member

Please offer fixes or clarification if I got any of this wrong.

@martinemde martinemde requested review from simi and segiddins April 9, 2024 18:38
@martinemde martinemde force-pushed the martinemde/compact-index-documentation branch 5 times, most recently from 13d3440 to 8e8bdfe Compare April 9, 2024 20:44

The format of the `versions` file uses one line per gem at computation time, with additional lines appended to the end that may include new or yanked versions of a gem already present earlier in the file.

The first line is a created_at timestamp in IOS8601 format.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for all compact index files, everything up to the --- is opaque metadata. Furthermore, the opaque metadata and --- separator line are optional.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the dashes are optional and your are reading the file, you can't look for the --- as the start of the parseable data. Do you just try to read lines until you can parse one? It seems hard to parse reliably if the --- is optional.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rubygems-org-compact-index-api.md Outdated Show resolved Hide resolved
rubygems-org-compact-index-api.md Outdated Show resolved Hide resolved
Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

rubygems-org-compact-index-api.md Outdated Show resolved Hide resolved
5. **`[(COMMA)DEPENDENCY]`** - (optional) A `,` (comma) character, indicating that another DEPENDENCY will follow. Read comma delimited DEPENCENCY chunks until the `|` (pipe) character is encountered.
6. **`(PIPE)`** - The `|` (pipe) character.
7. **`METADATA`** - Additional information about the gem, which always includes at least the SHA256 checksum. METADATA may contain spaces. See below for format.
5. **`[(COMMA)METADATA]`** - (optional) A `,` (comma) character, indicating that another METADATA will follow. Read comma delimited METADATA chunks until the end of the line.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numbering in this list seems odd?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, 1 2 2 3 5 6 7 5. Can you guess the next number is this sequence?

@martinemde martinemde force-pushed the martinemde/compact-index-documentation branch from e518a99 to 59ce84c Compare April 11, 2024 23:56
@martinemde martinemde merged commit c15641d into main Apr 11, 2024
1 check passed
@martinemde martinemde deleted the martinemde/compact-index-documentation branch April 11, 2024 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants