feat: Add support for per-file comments#543
Conversation
Summary of ChangesHello @gmlewis, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant enhancement by enabling the inclusion of per-file comments within ZIP archives. This feature provides a more granular way to attach descriptive metadata to individual entries, improving the overall utility and information richness of generated ZIP files. The changes involve extending the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully introduces support for per-file comments, which is a valuable addition. The implementation correctly handles comment storage, length validation, and UTF-8 flagging. The new start_file_with_comment and start_file_from_path_with_comment methods provide a clear API for this feature, and the accompanying test case ensures its functionality. The lifetime adjustments in src/read.rs and the is_ascii update in src/types.rs are also good improvements.
Pr0methean
left a comment
There was a problem hiding this comment.
I like the implementation of this PR, but the API needs a rework.
|
Thank you, @Pr0methean and @Its-Just-Nans! |
Pr0methean
left a comment
There was a problem hiding this comment.
Changing clone() to to_owned() won't help; see my inline comment.
Review consisted of 1 suggestion that was applied.
59747c3 to
808e546
Compare
Co-authored-by: n4n5 <git@n4n5.dev> Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
…d in some configurations Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
808e546 to
7702749
Compare
Note that the changes in:
were made to make
cargo clippyhappy.Fixes: #542.