feat(plugin): 既存 plugins/ → repos/ マイグレーション (PLAN04 PR2)#30
Draft
takemi-ohama wants to merge 2 commits into
Draft
feat(plugin): 既存 plugins/ → repos/ マイグレーション (PLAN04 PR2)#30takemi-ohama wants to merge 2 commits into
takemi-ohama wants to merge 2 commits into
Conversation
PLAN04 PR2。PR1 (#29) で repos/ 永続クローン方式に切り替えたが、PR1 以前に plugins/<name>/ へファイルコピーされた既存インストールは移行されないため、その 移行ロジックを追加する。 - migrator.py (新規): - needs_migration / _is_legacy_plugin: legacy plugins/ インストールの検出 (linked は --link 専用として除外) - _dirs_differ: コピーとクローンの差分検出 (内容変更・追加ファイルを保守的に差分扱い) - migrate: 未クローン repo の永続クローン作成、InstalledPlugin.path の repos/ 書き換え、 差分なしは plugins/<name> 削除・差分ありは <name>.bak 保全、sync_projects 再実行、 --link/.bak/skip が無ければ plugins/ を .gitkeep のみに正規化 - plugin migrate サブコマンド (cli.py / commands/plugin.py) - install/update 初回実行時に _auto_migrate で自動移行 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
PR1 (#29) で repos/ 永続クローン方式に切り替えたが、PR1 以前に
plugins/<name>/へファイルコピーされた既存インストールは移行されない。本 PR でその移行ロジックを追加する。
実装内容 (予定)
lib/devbase/plugin/migrator.py(新規): plugins/ → repos/ 移行ロジック.bak保全 + warningInstalledPlugin.pathの書き換え + sync_projects 再実行--linkが 0 件なら plugins/ を.gitkeepのみ残して削除lib/devbase/commands/plugin.py+cli.py:devbase plugin migrateサブコマンド追加tests/plugin/: マイグレーションテストTest plan
.bak保全--link残存時は plugins/ を維持 / 0 件なら .gitkeep 残して削除