8000 49 add comment on first line of generated files by PaulDelestrac · Pull Request #50 · silagokth/vesyla · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

49 add comment on first line of generated files #50

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

Merged
merged 4 commits into from
May 7, 2025

Conversation

PaulDelestrac
Copy link
Contributor

Added

  • [vs-component] Generated files (SystemVerilog, VHDL, JSON and YAML) now have the following comment included (9f71f13):

    // This file was automatically generated by Vesyla. DO NOT EDIT.
  • [vs-component] Generated files (SystemVerilog, VHDL, JSON and YAML) permissions are now switched to read-only after file generation (78de714)

Changed

@PaulDelestrac PaulDelestrac linked an issue May 5, 2025 that may be closed by this pull request
@PaulDelestrac PaulDelestrac self-assigned this May 5, 2025
@PaulDelestrac PaulDelestrac requested a review from Copilot May 5, 2025 15:34
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures that all generated files include a header comment stating they are auto‐generated and should not be edited, while also switching generated file permissions to read-only and bumping the version. Key changes include:

  • Inserting header comments based on file extension in RTL, SST simulation, and Bender files.
  • Enforcing read-only permissions on generated files.
  • Updating the project version and changelog.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
module/vs-component/src/utils.rs Adds dynamic comment prefix and header comment insertion in RTL file generation.
module/vs-component/src/sst_sim_gen.rs Prepends the auto-generated header to generated SST configuration files.
module/vs-component/src/rtl_code_gen.rs Incorporates header comment insertion when copying bender files and updates directory copy logic.
module/vs-component/src/main.rs Implements removal of write permissions by invoking new helper logic after file generation.
module/vs-component/src/isa_gen.rs Adjusts ISA JSON generation to include a header comment and uses pretty-printing.
module/vs-component/src/drra.rs Inserts header comments into Bender.yml files during DRRA processing.
module/vs-component/Cargo.toml Bumps the version to 0.2.1.
CHANGELOG.md Updates the changelog to document added header comments and permission changes.
Comments suppressed due to low confidence (1)

module/vs-component/src/utils.rs:314

  • [nitpick] Consider extracting the auto-generated file comment into a constant or helper function to reduce duplication and improve maintainability.
let file_comment = format!("{} This file was automatically generated by Vesyla. DO NOT EDIT.\n\n", comment_prefix);

@PaulDelestrac PaulDelestrac requested a review from herenvarno May 5, 2025 15:35
@PaulDelestrac PaulDelestrac added the feature New feature or request label May 5, 2025
Copy link
Member
@herenvarno herenvarno left a comment

Choose a reason for hiding this comment

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

Can you fix the changelog, then I will merge

@herenvarno herenvarno merged commit 7be7b01 into master May 7, 2025
1 check passed
@herenvarno herenvarno deleted the 49-add-comment-on-first-line-of-generated-files branch May 7, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add comment on first line of generated files
2 participants
0