Replies: 3 comments 3 replies
-
Hi @hughetop , I don't think it would be a good idea to allow cyclic dependencies, even if enabled through a CLI flag. I don't remember someone asking for this in the past (but my memory might be failing me) and we know that cyclic dependencies are generally bad. Adding a mode to allow cyclic dependencies in rez would let users shoot themselves in the foot. Note that I'm entirely speaking for myself here. |
Beta Was this translation helpful? Give feedback.
-
I could be wrong, but I believe that it's a fundamental requirement (not to allow cyclic dependencies) in order for the solver to remain deterministic. |
Beta Was this translation helpful? Give feedback.
-
I do not see any good reason to keep a circular dependency around.
If you deal with it now, your future self will thank you.
If you are really really under pressure and you understand the
consequences, you can lie to rez and not declare one of the dependencies,
depending on what you care about
i.e you can just remove the dependency to A on packageB.
I guess it also depends if they are build or runtime dependencies. my
example above will work fine for runtime because both will be in the
environment if they are builtime dependencies you better reorganize those
packages
…On Sun, Dec 4, 2022 at 9:09 AM Jean-Christophe Morin < ***@***.***> wrote:
The resolver is indeed a good argument. I also agree that we probably all
had cases where allowing cycles would have made our life easier. But if
doesn't mean it's a good idea to support cycles.
—
Reply to this email directly, view it on GitHub
<#1416 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVRQRBYMLH6HVM35Z4XSGTWLPAJLANCNFSM6AAAAAASRKYF6M>
.
You are receiving this because you are subscribed to this thread.Message
ID: <AcademySoftwareFoundation/rez/repo-discussions/1416/comments/4301116@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Should there be an option for cyclic dependencies that do not result in a conflict to just continue? I'm porting some packages to rez and finding a few cyclic dependencies, but they don't cause any conflicts. Example:
packageA-1.2.3 requires packageB-3.2.1
packageB-3.2.1 requires packageA-1.2.3
A cyclic dependency was detected: packageA-1.2.3 --> packageB-3.2.1 --> packageA-1.2.3
This will fail to build because of the cyclic dependency, but there's no actual package conflict. Would it even make sense to have a new arg for rez-build and rez-env to optionally skip non-conflicting cycles?
Ideally code would be reorganized to avoid dependency cycles, but that is a long project that there isn't time for right now.
Beta Was this translation helpful? Give feedback.
All reactions