Closed Bug 342238 Opened 18 years ago Closed 18 years ago

There is a dependency loop between Bugzilla::User and Bugzilla::Component

Categories

(Bugzilla :: Bugzilla-General, defect)

2.23
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file)

justdave's dependency-graphing script has pointed out that there is a dependency loop that goes like: Bugzilla::User -> Bugzilla::Product -> Bugzilla::Component -> Bugzilla::User This should be very easy to fix.
Attached patch v1 (deleted) — Splinter Review
Here we go, trivial fix. I can assure you that this works, even though justdave's script may not realize that it fixes the loop.
Attachment #226447 - Flags: review?
Attachment #226447 - Flags: review? → review?(bugzilla-mozilla)
Comment on attachment 226447 [details] [diff] [review] v1 I assumed your words mean you tested this as I am not sure how to test it myself. By reading the 'use' and 'require' documentation in man perlfunc this patch does the right thing; man perlfunc explains that 'use' is basically a 'require' at compile time. r=bkor
Attachment #226447 - Flags: review?(bugzilla-mozilla) → review+
Flags: approval?
Flags: approval? → approval+
Status: NEW → ASSIGNED
Checking in Bugzilla/Product.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Product.pm,v <-- Product.pm new revision: 1.16; previous revision: 1.15 done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
This patch is nothing more than a big hack. I really hate it (and I wouldn't have granted review for such a patch).
It's not a big hack at all. It's a pretty good way of avoiding a dep loop, and it makes total sense. I may do the same thing inside of Bugzilla.pm to make checksetup.pl stop spitting out CGI::Carp-style errors.
No, it's a hack. You do it for Component, but not for Version nor for Milestone, despite they are used exactly the same way in Product.pm. I know they are not involved in any dependency loop. This doesn't mean what you did here makes me happy.
Okay, I understand. The bug was the dep loop, and I fixed it with the least code change possible. I also think that the other proposed fixes (changing the architecture just to work around a dependency loop) were really not good ideas at all. The architecture is nice, and this makes it keep on working.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: