Skip to content

feat(generator): begin generated repositories with a do-not-edit notice - #38

Merged
omer-cengel merged 2 commits into
masterfrom
feature/stable-generated-code-notice
Sep 25, 2026
Merged

omer-cengel merged 2 commits into
masterfrom
feature/stable-generated-code-notice

Conversation

@omer-cengel

Copy link
Copy Markdown
Member

Summary

Every generated repository source now opens with one fixed line, // Code generated by sqlcj. DO NOT EDIT., so readers and tools can recognize generated files and know not to edit them by hand. The notice is constant text, so repeated generation over identical input stays byte-identical.

Changes

  • The Java generator emits // Code generated by sqlcj. DO NOT EDIT. as the first line of each repository, followed by one blank line and the existing package declaration; everything after the package line, including the Generated by sqlcj. class Javadoc, is unchanged.
  • Generator, compiler, and generate command tests assert the new prefix for the default and a configured package, a single notice occurrence, the retained Javadoc, and that the generated source still compiles; the existing two-run byte-identical test passes unchanged.
  • The query guide shows the notice at the top of the AuthorRepository listing and states that the notice contains no version, timestamp, or filesystem path.

Scope and non-goals

  • The output manifest is not Java source and is unchanged.
  • No version string, @Generated annotation, or runtime-version marker is added.
  • Generated class layout, naming, and the CLI and configuration surfaces are unchanged.

@omer-cengel
omer-cengel merged commit 8de7a6f into master Sep 25, 2026
6 checks passed
@omer-cengel
omer-cengel deleted the feature/stable-generated-code-notice branch September 25, 2026 21:11
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.

1 participant