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

export error #12

Open
hound672 opened this issue Jan 14, 2024 · 1 comment
Open

export error #12

hound672 opened this issue Jan 14, 2024 · 1 comment

Comments

@hound672
Copy link
Contributor

hound672 commented Jan 14, 2024

Try:

buf export myserver.loc/bufbuild/protovalidate --output proto

Got:

proto/protovalidate-testing/tests/migrate/none.source.proto:26:9:symbol "tests.migrate.Foo" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:26:9
proto/protovalidate-testing/tests/migrate/none.source.proto:32:19:symbol "tests.migrate.Foo.alpha" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:32:19
proto/protovalidate-testing/tests/migrate/none.source.proto:35:19:symbol "tests.migrate.Foo.beta" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:35:19
proto/protovalidate-testing/tests/migrate/none.source.proto:36:19:symbol "tests.migrate.Foo.gamma" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:36:19
proto/protovalidate-testing/tests/migrate/none.source.proto:37:7:symbol "tests.migrate.Foo.DeltaEntry.key" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:37:7
proto/protovalidate-testing/tests/migrate/none.source.proto:37:14:symbol "tests.migrate.Foo.DeltaEntry.value" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:37:14
proto/protovalidate-testing/tests/migrate/none.source.proto:37:19:symbol "tests.migrate.Foo.DeltaEntry" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:37:19
proto/protovalidate-testing/tests/migrate/none.source.proto:37:19:symbol "tests.migrate.Foo.delta" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:37:19
proto/protovalidate-testing/tests/migrate/none.source.proto:39:9:symbol "tests.migrate.Foo.union" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:39:9
proto/protovalidate-testing/tests/migrate/none.source.proto:40:12:symbol "tests.migrate.Foo.epsilon" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:40:12
proto/protovalidate-testing/tests/migrate/none.source.proto:41:12:symbol "tests.migrate.Foo.zeta" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:41:12
proto/protovalidate-testing/tests/migrate/none.source.proto:44:11:symbol "tests.migrate.Foo.Bar" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:44:11
proto/protovalidate-testing/tests/migrate/none.source.proto:45:21:symbol "tests.migrate.Foo.Bar._x" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:45:21
proto/protovalidate-testing/tests/migrate/none.source.proto:45:21:symbol "tests.migrate.Foo.Bar.x" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:45:21
proto/protovalidate-testing/tests/migrate/none.source.proto:48:8:symbol "tests.migrate.Foo.Baz" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:48:8
proto/protovalidate-testing/tests/migrate/none.source.proto:49:5:symbol "tests.migrate.Foo.BAZ_UNSPECIFIED" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:49:5; protobuf uses C++ scoping rules for enum values, so they exist in the scope enclosing the enum
proto/protovalidate-testing/tests/migrate/none.source.proto:50:5:symbol "tests.migrate.Foo.BAZ_ONE" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:50:5; protobuf uses C++ scoping rules for enum values, so they exist in the scope enclosing the enum
proto/protovalidate-testing/tests/migrate/none.source.proto:54:6:symbol "tests.migrate.Fizz" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:54:6
proto/protovalidate-testing/tests/migrate/none.source.proto:55:3:symbol "tests.migrate.FIZZ_UNSPECIFIED" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:55:3; protobuf uses C++ scoping rules for enum values, so they exist in the scope enclosing the enum
proto/protovalidate-testing/tests/migrate/none.source.proto:56:3:symbol "tests.migrate.FIZZ_ONE" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:56:3; protobuf uses C++ scoping rules for enum values, so they exist in the scope enclosing the enum
proto/protovalidate-testing/tests/migrate/none.source.proto:59:9:symbol "tests.migrate.Buzz" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:59:9
proto/protovalidate-testing/tests/migrate/none.source.proto:60:7:symbol "tests.migrate.Buzz.Do" already defined at proto/protovalidate-testing/tests/migrate/none.migrated.proto:60:7
 buf --version
1.28.1

Cache repo:

$ git remote -v
origin  https://github.com/bufbuild/protovalidate.git (fetch)
origin  https://github.com/bufbuild/protovalidate.git (push)

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean


$ git show HEAD --stat
commit fb61006672a14b4fc5a1896b0738d921a3a20193 (HEAD -> main, origin/main, origin/HEAD)
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 2 09:23:23 2024 -0800

With original remote (buf.build) works well

@hound672
Copy link
Contributor Author

hound672 commented Jan 14, 2024

Looks like easyp-server ignores buf.work.yaml file in repo, which contains paths where proto files are stored.
For example, https://github.com/bufbuild/protovalidate contains buf.work.yaml:

$ cat buf.work.yaml
version: v1
directories:
  - proto/protovalidate
  - proto/protovalidate-testing

But in DownloadManifestAndBlobs method iterate over alll files in local repository.
So, I think, first of all, should try to read buf.work.yaml and if it exists read proto files only from this dir

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

No branches or pull requests

1 participant