Skip to content

Add declarative YAML configuration format for astra-cli#146

Draft
RadikalJin wants to merge 1 commit into
mainfrom
feat/yaml-config
Draft

Add declarative YAML configuration format for astra-cli#146
RadikalJin wants to merge 1 commit into
mainfrom
feat/yaml-config

Conversation

@RadikalJin

Copy link
Copy Markdown
Member

Introduces a new astra yaml --config <file.yaml> subcommand that reads refactoring operations from a YAML file instead of requiring users to write Java code. Two operation types are supported:

  • typeReference: rename / repackage a fully-qualified type everywhere
  • methodInvocation: rename a method and/or move it to a different class, with optional parameter-list and varargs constraints for overload matching

New files:

  • config/ package: RefactorConfig, RefactorEntry, MethodFromConfig, MethodToConfig, YamlConfigParser (Jackson YAML), AstraOperationFactory
  • commandline/AstraYamlRefactor: picocli subcommand wiring
  • example-refactors.yaml: annotated schema reference
  • 22 unit tests (TestYamlConfigParser x 7, TestAstraOperationFactory x 15)

Dependency added: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.2

Introduces a new `astra yaml --config <file.yaml>` subcommand that reads
refactoring operations from a YAML file instead of requiring users to write
Java code. Two operation types are supported:

- `typeReference`: rename / repackage a fully-qualified type everywhere
- `methodInvocation`: rename a method and/or move it to a different class,
  with optional parameter-list and varargs constraints for overload matching

New files:
- `config/` package: RefactorConfig, RefactorEntry, MethodFromConfig,
  MethodToConfig, YamlConfigParser (Jackson YAML), AstraOperationFactory
- `commandline/AstraYamlRefactor`: picocli subcommand wiring
- `example-refactors.yaml`: annotated schema reference
- 22 unit tests (TestYamlConfigParser x 7, TestAstraOperationFactory x 15)

Dependency added: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.

1 participant