Closed Bug 72862 Opened 25 years ago Closed 25 years ago

<q src="tinderbox" class="warning,orange">globals.pl uses relationset requires globals.pl</q>

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.14

People

(Reporter: timeless, Assigned: justdave)

Details

(Keywords: arch)

Attachments

(1 file)

I think this is the problem both bugzilla tinderboxes are orange due to compilation warnings in globals.pl. globals.pl uses relationset, and relationset.pm requires globals.pl
globals.pl is not a proper perl module that can be accessed with "use", hence the "requires" hack. Fix that, and I think this problem should go away.
"requires" is not supposed to load a module if it's already loaded. Is there something weird about the way it's being called that causes Perl to think it hasn't been loaded yet?
perhaps it's because globals.pl isn't already loaded, it's in the process of loading? for fun, I'll try to write something that doesn't do this ...
Keywords: arch
Target Milestone: --- → Bugzilla 2.18
I had a thought... all of the other files require globals.pl. Are you getting warnings when you compile the others? If not, probably what's happening is because you're trying to compile globals.pl as a standalone. Perl doesn't know it's been loaded already because it's never been "required". Perl knows it as "main" :)
yes this is only when compiling globals.pl, are you saying we should remove it from the list of files to compile? [easy to do]
probably. Since it's included in some shape or form from the rest of the files, you're automatically compiling it every time you compile one of the others. And how often does globals.pl get called directly in Bugzilla? (never) So why should we call it directly when testing it?
ok, changing severity to normal because tinderbox test has been changed so that it no longer makes this test. i still don't like the conceptual loop.
Severity: major → normal
Taking this. Fix is in hand and it'll make our Tinderbox tree go green. :-)
Assignee: tara → justdave
Target Milestone: Bugzilla 2.18 → Bugzilla 2.14
after fixing the dependency loop, perl -cw global.pl failed because RelationSet.pm didn't set a true value before exiting, and therefore failed to load. Oops. So I added the 1; on the end of it, too. Also fixed the only two warning left in globals.pl after doing this, which were both "used only once" errors. Added them to the list at the top.
Keywords: patch, review
r=myk Minor nit: "use's" should be "uses" in the comment in RelationSet.pm.
ok, got rid of the ' in the comment. Checked in.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Moving to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: other → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: