Conversation
Apply managed mode overrides to all files in the generation request, including dependencies and git_repo inputs, and rely on disable/module/path selectors only to narrow rules. Add regression coverage for generate + git_repo + managed mode, switch the new core test mocks to direct mockery go:generate directives, and update the guide/spec docs plus built search indexes to match the new semantics.
Add exact package-based matching for managed mode disable and override rules, wire it through config parsing, runtime conversion, JSON schema, MCP docs, and user guides, and cover the new behavior with runtime/config/schema tests.
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.
Что сделано
1. Приведено поведение managed mode к buf-like семантике
Исправлена логика применения
managed modeдля генерации кода.Раньше глобальные
overrideфактически применялись только к локальным файлам, аgit_repoи зависимости могли ошибочно трактоваться как external-only inputs. Из-за этого сценарий сgit_repo + managed + go_package_prefixне работал:go_packageне выставлялся, иprotoc-gen-goпадал с ошибкой определения import path.Теперь:
overrideприменяются ко всем файлам в запросе генерацииgit_repoinputs и зависимостиdisable,moduleиpathиспользуются как селекторы для сужения правил, а не как обязательный opt-in для external файловЭто делает поведение ближе к
buf managed modeи исправляет кейс с генерацией изgit_repo.2. Добавлен селектор
packageдля managed modeВ
managed.disableиmanaged.overrideдобавлена поддержка селектораpackage.Он матчится по protobuf
packageиз самого.protoфайла точным совпадением и позволяет:go_package/go_package_prefixи другие file options для конкретного proto packagemoduleилиpathнеудобныВажно:
package— это расширение EasyP, а не часть buf configfield-поведение не менялось и остаётся buf-like: оно используется только сfield_option3. Обновлены schema, MCP docs и пользовательская документация
Обновлены:
easypconfigmetadatadocs/dist4. Добавлены и обновлены тесты
Добавлено покрытие на:
generate + git_repo + managed modedisableдля external modulespackage-scopedoverridepackage-scopeddisablepackageselectorДля новых тестов вместо hand-written stubs используются
mockery-generated mocks черезgo:generate.Изменение поведения
После этого PR:
managed.overrideприменяется ко всем файлам генерации, включая зависимостиmanaged.disablemoduleиpath, но и по protobufpackageПроверка
Проверено командами:
go test ./...task schema:generatecd docs && npm run build