Skip to content

feat(internal/librarian): sync new libraries to legacy state.yaml#5030

Merged
JoeWang1127 merged 10 commits intomainfrom
chore/update-state
Apr 3, 2026
Merged

feat(internal/librarian): sync new libraries to legacy state.yaml#5030
JoeWang1127 merged 10 commits intomainfrom
chore/update-state

Conversation

@JoeWang1127
Copy link
Copy Markdown
Contributor

The librarian add command is modified to automatically update the legacy .librarian/state.yaml when a new library is added to librarian.yaml.

This ensures that tools still relying on the legacy manifest remain in sync during the migration period. Only Go is enabled.

Fixes #5011

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces functionality to synchronize the legacy .librarian/state.yaml configuration file when adding new libraries, specifically for Go. It adds the syncToStateYAML and createLegacyLibrary functions, along with corresponding unit tests. Review feedback suggests replacing a single-case switch statement with a more idiomatic if condition and notes that the APIs field should be populated in the legacy library state to maintain compatibility with tools relying on the legacy manifest.

@JoeWang1127 JoeWang1127 marked this pull request as ready for review April 3, 2026 01:04
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner April 3, 2026 01:04
@JoeWang1127 JoeWang1127 enabled auto-merge (squash) April 3, 2026 12:51
@JoeWang1127 JoeWang1127 merged commit cdd77aa into main Apr 3, 2026
30 checks passed
@JoeWang1127 JoeWang1127 deleted the chore/update-state branch April 3, 2026 12:57
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.

golang: sync new library config from librarian.yaml to state.yaml in librarian add

2 participants