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

Could not find package #27

Open
noel-yap opened this issue Aug 2, 2020 · 2 comments
Open

Could not find package #27

noel-yap opened this issue Aug 2, 2020 · 2 comments

Comments

@noel-yap
Copy link
Contributor

noel-yap commented Aug 2, 2020

My protos are defined in a directory src/main/proto. I've placed the protop.json file in the same directory. https://github.com/noel-yap/setter-for-catan-sb/blob/use-protop/src/main/proto/protop.json

In a client project, I've created protop.json as:

{
  "organization" : "noelyap",
  "name" : "setter-for-catan-tsx",
  "version" : "0.1.0",
  "include" : [ "." ],
  "private": true,  
  "dependencies" : {
    "noelyap/setter-for-catan": "git:https://github.com/noel-yap/setter-for-catan-sb/tree/use-protop/src/main/proto"
  }
}

When I run protop sync, it errors with Could not find package noelyap/setter-for-catan https://github.com/noel-yap/setter-for-catan-sb/tree/use-protop/src/main/proto.

I've created a Stackoverflow question for this, too: https://stackoverflow.com/questions/63219696/where-to-place-protop-json-file

@jefferyshivers
Copy link
Contributor

At this point, protop is only able to handle non-nested projects with a top-level manifest. We can look into the use cases of nesting projects beneath the root, but a simpler structure is necessary for now.

It sounds like you currently have a project like this:

src
└── main
    └── proto
        ├── something.proto
        └── protop.json

Since you probably don't want to mix a protop package with other non-proto sources anyway, the following should work (and will work with the current limitations of nesting):

something.proto
protop.json

I'd suggest nesting protos under a directory structure that reflects the packages as well though, so if something.proto declared package com.company.something, the following would make sense:

com
└── company
    └── something.proto
protop.json

@noel-yap
Copy link
Contributor Author

#30

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

2 participants