Skip to content

depinst option to detect cycles#30

Merged
pdimov merged 1 commit into
boostorg:developfrom
grisumbras:feature/detect-cycles
Oct 9, 2025
Merged

depinst option to detect cycles#30
pdimov merged 1 commit into
boostorg:developfrom
grisumbras:feature/detect-cycles

Conversation

@grisumbras

Copy link
Copy Markdown
Member

This PR adds an option to depinst to detect cycles for the topmost library. A detected cyle is treated like an error (an exception is raised).

@grisumbras
grisumbras force-pushed the feature/detect-cycles branch from 8fa9a17 to 352bc19 Compare October 9, 2025 06:42
@pdimov

pdimov commented Oct 9, 2025

Copy link
Copy Markdown
Member

Looks like this doesn't do anything when a cycle is detected, but just crashes with an unhandled exception?

@grisumbras

Copy link
Copy Markdown
Member Author

Yes, my idea was that you add the flag and then your CI jobs fail if you get a cycle. Python will print the exception message which contains the cycle description.

Comment thread depinst/depinst.py Outdated
Comment thread depinst/depinst.py Outdated
@pdimov

pdimov commented Oct 9, 2025

Copy link
Copy Markdown
Member

I'm not entirely convinced of the use case for this option, but I suppose it could be useful in a scenario when a cycle is introduced somewhere and then removed; this can then be added to CI to prevent the problem from reappearing.

Or perhaps you could make a PR to e.g. Geometry with the option added to demonstrate that a cycle is present.

@grisumbras

Copy link
Copy Markdown
Member Author

Well, we can advertise this new option. I can also make the flag to default to True.

Or do you have an idea for an alternative approach?

@pdimov

pdimov commented Oct 9, 2025

Copy link
Copy Markdown
Member

No, I don't want it to default to True. depinst works perfectly well when cycles are present.

@grisumbras
grisumbras force-pushed the feature/detect-cycles branch from 352bc19 to 8ed46bb Compare October 9, 2025 13:38
@pdimov
pdimov merged commit dde2b85 into boostorg:develop Oct 9, 2025
38 checks passed
@grisumbras
grisumbras deleted the feature/detect-cycles branch October 9, 2025 16:33
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

Successfully merging this pull request may close these issues.

2 participants