stormcat24 / protodep

Collect necessary .proto files (Protocol Buffers IDL) and manage dependencies
Apache License 2.0
296 stars 56 forks source link

Resolve nested dependencies #25

Open abemedia opened 6 years ago

abemedia commented 6 years ago

Hi @stormcat24, I just realised that dependencies of dependencies don't get resolved. How about checking for the existence of protodep.toml after cloning a repo and pulling in any dependencies within the same path?

stormcat24 commented 6 years ago

@abeMedia That's right. Nested dependencies are unsupported yet. When I made protodep at first, it was not necessary. But this feature will soon be required.

How about checking for the existence of protodep.toml after cloning a repo and pulling in any dependencies within the same path?

I pretty much agree, but I'm concerned about cyclic dependencies. When protodep scans dependencies recursively, this problem can be avoided by checking for duplicates.

And one more, case of different revisions in duplicated dependencies. Which revision should be choiced? I think shallow hierarchy should be given high priority.

abemedia commented 6 years ago

Hmm good point I hadn't given it that much thought. For now we could simply throw an error about a version conflict with a flag to ignore all conflicts (and take the current repository's revision by default). This might not be ideal behaviour but in my opinion its a good starting point and fairly easy to implement.

As for cyclic imports, that is a tricky one... My feeling is to express a warning in the docs that they are forbidden and trust that all users will be wise enough to listen :rofl:

stormcat24 commented 6 years ago

For now we could simply throw an error about a version conflict with a flag to ignore all conflicts (and take the current repository's revision by default).

I think this method is best at now 👍

Although avoiding cyclic will be a future feature, nest dependency should be implemented.

hojongs commented 3 years ago

Is there any update?? This is so nice feature