Skip to content

feat: build to bundle README.md in .kpar (not configurable)#239

Open
consideRatio wants to merge 1 commit intosensmetry:mainfrom
consideRatio:pr/simple-readme
Open

feat: build to bundle README.md in .kpar (not configurable)#239
consideRatio wants to merge 1 commit intosensmetry:mainfrom
consideRatio:pr/simple-readme

Conversation

@consideRatio
Copy link
Copy Markdown
Collaborator

@consideRatio consideRatio commented Mar 19, 2026

If a README.md file exists at the project root, it is automatically included in the .kpar archive. This allows package indexes to display README content on package pages. If no README.md exists, the build proceeds normally.

The README.md inclusion, or file choice, isn't configurable in this PR. It just relies on detecting the hardcoded path. I tried it in #217 but I found that when configuration fields arrived, in combination with bindings and workspaces, the complexity exploded and I want to do more smaller PRs instead of a massive one.

By getting this to land first, we can get to verify the sysand client and index server interactions.

@consideRatio consideRatio changed the title feat: bundle README.md into .kpar archives during build feat: build to bundle README.md in .kpar (not configurable) Mar 19, 2026
compression: KparCompressionMethod,
canonicalise: bool,
allow_path_usage: bool,
readme_source_path: Option<&Utf8Path>,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is always Some.

Suggested change
readme_source_path: Option<&Utf8Path>,
readme_source_path: Utf8PathBuf,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Actually, since this is not configurable, this arg is not required at all.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

from: &Pr,
path: P,
compression: zip::CompressionMethod,
readme: Option<&[u8]>,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a reason to not use &str/String? We (should) mandate README to be in UTF-8, so using a String would be a good validation of that.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nice call, fixed!

@consideRatio consideRatio force-pushed the pr/simple-readme branch 2 times, most recently from f30f242 to ed32baa Compare March 31, 2026 12:53
@consideRatio
Copy link
Copy Markdown
Collaborator Author

Thank you @andrius-puksta-sensmetry for reviewing!! I've updated things based on your feedback and rebased this branch on main.

If a README.md file exists at the project root, it is automatically
included in the .kpar archive. This allows package indexes to display
README content on package pages. If no README.md exists, the build
proceeds normally.

Closes sensmetry#86

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
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.

2 participants