Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] tools/protovalidate-migrate command error #15

Closed
shuqingzai opened this issue Jun 7, 2023 · 2 comments · Fixed by #19
Closed

[BUG] tools/protovalidate-migrate command error #15

shuqingzai opened this issue Jun 7, 2023 · 2 comments · Fixed by #19
Labels
Bug Something isn't working

Comments

@shuqingzai
Copy link

Description

  1. When instantiating Migrator, no values were assigned to Migrator.print and Migrator.write, only cfg was assigned to Migrator

func NewMigrator(cfg Config) *Migrator {

  1. When executing Migrator.migrate(), use Migrator.print or Migrator.write, but they are both false, making the tool unusable

func (m *Migrator) migrate(rootPath, srcPath string, stat fs.DirEntry) error {

Steps to Reproduce

Expected Behavior

Actual Behavior

Screenshots/Logs

Environment

  • Operating System:
  • Version:
  • Compiler/Toolchain:
  • Protobuf Compiler & Version:
  • Protoc-gen-validate Version:
  • Protovalidate Version:

Possible Solution

Additional Context

@shuqingzai shuqingzai added the Bug Something isn't working label Jun 7, 2023
@srikrsna-buf
Copy link
Member

Hey! Did you try the tool with the -w flag?

@shuqingzai
Copy link
Author

shuqingzai commented Jun 7, 2023

Hey! Did you try the tool with the -w flag?

@srikrsna-buf

of course

-> % go run ./tools/protovalidate-migrate -w test-proto/project/test.proto
# ouput...
nothing to migrate
exit status 1

When I assign them values, it works fine

image

@rodaine rodaine closed this as completed in 47de4e8 Jun 8, 2023
igor-tsiglyar pushed a commit to igor-tsiglyar/protovalidate that referenced this issue Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants