Repository navigation
COBOL -> Java: YAML target config, read by GitGalaxy's own YAML reader (#3613) - #3628
Merged
Merged
Conversation
…der (#3613) The Java generator hardcoded Spring Boot 3.2.4, Java 17, Maven, PostgreSQL, Lombok, JPA and Spring Batch; only --pkg / --header were options. Now a YAML (or JSON) config chooses the target: cobol-to-java --init-config modernize.yaml # annotated defaults cobol-to-java <staging dir> --config modernize.yaml - project: package, group_id, artifact_id, version, description, header_file - java: version (17 | 21), build_tool (maven | gradle), data_classes (lombok | plain -- explicit constructors / getters / setters), dto_style (class | record) - spring_boot: version (3.x.y) - database: engine (postgresql | db2 | oracle | mysql | h2: driver, dialect, URL), ddl_auto, credentials, show_sql - features: rest_controllers, services, batch, ebcdic_decoder, mock_services, agent_tickets Every key is validated (unknown keys, unsupported values, and controllers without services are errors naming the key). CLI flags beat the file, the file beats the defaults. Without --config the output is byte-identical: the refraction snapshot shows 0 files differing on all six corpora. gitgalaxy/standards/yaml_reader.py: GitGalaxy's own strict YAML reader -- no PyYAML. It reads the configuration subset (block mappings / sequences, flow sequences, the YAML 1.2 core scalars, quotes, comments) and rejects the rest (anchors, tags, block scalars, flow mappings, multi-document, tabs, duplicate keys) with an error naming the line. Checked against PyYAML where installed. tests/tools/java_target_matrix.py generates CardDemo under 13 configs and runs the real build: Java 17 / 21, Maven / Gradle, Lombok / plain / records, Boot 3.2 / 3.3, all five databases, a minimal feature set -- 13/13 compile. (The runner #3121 can put in CI.) Closes #3613 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
…torage) CodeQL flagged database.password flowing from the config into the generated application.yml as clear text. A config is stored with the project, so it must not carry a password at all: the key is gone (a config that sets database.password is rejected with that reason), and the generated application.yml keeps its historic placeholder, to be overridden by SPRING_DATASOURCE_PASSWORD at runtime. Default output stays byte-identical. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Java generator hardcoded Spring Boot 3.2.4, Java 17, Maven, PostgreSQL,
Lombok, JPA and Spring Batch; only --pkg / --header were options. Now a YAML
(or JSON) config chooses the target:
(lombok | plain -- explicit constructors / getters / setters), dto_style
(class | record)
URL), ddl_auto, credentials, show_sql
agent_tickets
Every key is validated (unknown keys, unsupported values, and controllers
without services are errors naming the key). CLI flags beat the file, the file
beats the defaults. Without --config the output is byte-identical: the
refraction snapshot shows 0 files differing on all six corpora.
gitgalaxy/standards/yaml_reader.py: GitGalaxy's own strict YAML reader -- no
PyYAML. It reads the configuration subset (block mappings / sequences, flow
sequences, the YAML 1.2 core scalars, quotes, comments) and rejects the rest
(anchors, tags, block scalars, flow mappings, multi-document, tabs, duplicate
keys) with an error naming the line. Checked against PyYAML where installed.
tests/tools/java_target_matrix.py generates CardDemo under 13 configs and runs
the real build: Java 17 / 21, Maven / Gradle, Lombok / plain / records, Boot
3.2 / 3.3, all five databases, a minimal feature set -- 13/13 compile. (The
runner #3121 can put in CI.)
Closes #3613
Verification
Part of epic #3625.
🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g