On Sun, Jul 6, 2014 at 8:25 PM, Gregory Szorc <[email protected]> wrote: > > I anticipated this would be a difficult problem to solve.
Thanks for helping out! > I would suggest two phases. > > First, get the naming sorted out. Ensure all modules are using relative > imports (from . import data) or are using fully qualified imports (from > pymake import data). Yes, this is a pretty simple maneuvre, except nothing works until the below is taken care of. > Second, break the import cycles. If modules only have 1 or 2 references to > another module that's in a cycle, move the module-level import into a def. > As a follow-up, you can move things around to break the cycle. I've been able to move some constructs, but they are rather few and far between. > If you really > want to be hacky, you can have the "parent" module set attributes on the > "child" module for the symbols needed by the child. e.g. I prefer not to be hacky, but this problem is eating away on my ideals :-) How do you decide on parent vs. child, though? Do you have intuition for which is which, or do you just call the least-dependent child and the most-dependent parent? > Long term, we should refactor to avoid this hackery. But as someone who has > attempted that once, it's not going to be fun. I encourage you to try. But > don't dismiss a "good enough" hacky solution. I'll do my best. Cheers, - Kim _______________________________________________ dev-builds mailing list [email protected] https://lists.mozilla.org/listinfo/dev-builds

