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

Import step dependecies relying on circular dependencies may result in bad order #4

Open
tseaver opened this issue May 22, 2015 · 0 comments

Comments

@tseaver
Copy link
Member

tseaver commented May 22, 2015

In https://bugs.launchpad.net/zope-cmf/+bug/314010, Bertrand Mathieu (@bmathieu?) reported:

an example is here: http://dev.plone.org/plone/ticket/8350

if 'my-step' must be executed before 'mandatory-step', and 'mandatory-step' is involved in a circular dependency chain (with 'circular-step' for example), then sorted imported steps will be: ['my-step', 'mandatory-step', 'circular-step'].

This is reproducible if you define 'my-step' with zcml, and the other steps in a profile (with import_steps.xml).

I have posted a monkey patch in plone ticket system #8350 (in order to help others with a hopefully good workaround). There is also doctest that should fail with current implementation and succeed with mine. The idea is to change final loop and insert all steps detected involved in a circular loop, and then trying to resolve remaining dependencies before eventually inserting unresolved steps.

I don't know if it is the best way to solve this problem, but at least it should be a good start.

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

1 participant