protodep icon indicating copy to clipboard operation
protodep copied to clipboard

Resolve nested dependencies

Open abemedia opened this issue 8 years ago • 4 comments

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?

abemedia avatar Feb 22 '18 11:02 abemedia

@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.

stormcat24 avatar Feb 22 '18 14:02 stormcat24

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:

abemedia avatar Feb 23 '18 22:02 abemedia

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.

stormcat24 avatar Feb 24 '18 04:02 stormcat24

Is there any update?? This is so nice feature

hojongs avatar Mar 17 '21 02:03 hojongs