Open Bug 2070532 Opened 2 months ago Updated 19 days ago

Install function "GetPostUpdateTarget" not referenced

Categories

(Firefox :: Installer, defect, P3)

defect

Tracking

()

ASSIGNED
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox-esr153 --- unaffected
firefox155 --- unaffected
firefox156 --- wontfix
firefox157 --- wontfix
firefox158 --- wontfix
firefox159 --- fix-optional

People

(Reporter: aborondo, Assigned: spohl)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [fidedi])

Attachments

(1 external file)

As a developer, I want to eliminate warning 6010 when packaging Firefox so that ./mach package completes without warnings:

warning 6010: install function "GetPostUpdateTarget" not referenced - zeroing code (3144-3171) out
Keywords: regression
Regressed by: 2030812
Whiteboard: [fidedi]

Set release status flags based on info from the regressing bug 2030812

:dmcintosh, since you are the author of the regressor, bug 2030812, could you take a look?

For more information, please visit BugBot documentation.

postupdate_helper.nsh defines GetPostUpdateTarget, whose only non-test caller is the PostUpdate macro in uninstaller_helpers.nsh, a file setup.exe never includes, so installer.nsi still compiles the function through shared.nsh and makensis emits 6010. The definition came from bug 2030812 Part 2 (5266c2e18598); helper.exe references it as before, so post-update behavior is not affected.

Fix: Guard the definition the way the same problem is already handled at shared.nsh: add a define (say NEED_POSTUPDATE_TARGET) in uninstaller.nsi and test_stub.nsi, and wrap Function GetPostUpdateTarget in an !ifdef on it so only helper.exe and test_stub_installer.exe build it.

Suggested severity: S4. Build-time warning only, with no change to what the shipped installer or the post-update helper does for a user.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-wrong-file, ai-triage-wrong-cause, ai-triage-hallucination, ai-triage-out-of-scope, ai-triage-wrong-fix, ai-triage-shallow-fix.

Severity: -- → S4
Priority: -- → P3

Right, I don't remember if I expected that or not. I think this was a conflict between two places:

  • uninstaller_helper.nsh wouldn't have this warning, but (if I recall) it wouldn't work in tests, and I wanted coverage for this.
  • postupdate_helper.nsh has this warning, but it does work in tests.

I feel like splitting this out into yet another file isn't a good move, but I'm not sure what is a good move. Maybe it could be wrapped with !ifdef UNINSTALLER_HELPERS_H or !ifdef UNINSTALLER_CODE, paired with !define UNINSTALLER_CODE in test_stub.nsh and uninstaller.nsi? [looks like that matches the robot suggestion.]

The classical approach is a macro like those in toolkit/mozapps/installer/windows/nsis/common.nsh, but from what I can tell the trend was (subconsciously?) moving away from that, it is really verbose and it can mask actually-unused functions.

I could write a patch if desired, but it might be easier for you to do so since I don't have a local Win32 build setup and I'm not sure what approach you'd want to go for, let me know what's best. I could review (r?aurora) if desired, still am in browser-installer-reviewers >:)

(As an aside, NSIS looks like it supports a /WX flag to treat warnings as errors. Maybe we should start using that so this gets caught earlier?)

Flags: needinfo?(aurora)

Set release status flags based on info from the regressing bug 2030812

I'm guessing wontfix for 157 if there isn't a patch in progress already

Set release status flags based on info from the regressing bug 2030812

Assignee: nobody → mferreiro
Status: NEW → ASSIGNED
See Also: → 2085240

(In reply to Duncan McIntosh [:dmcintosh] from comment #3)

Right, I don't remember if I expected that or not. I think this was a conflict between two places:

  • uninstaller_helper.nsh wouldn't have this warning, but (if I recall) it wouldn't work in tests, and I wanted coverage for this.
  • postupdate_helper.nsh has this warning, but it does work in tests.

I feel like splitting this out into yet another file isn't a good move, but I'm not sure what is a good move. Maybe it could be wrapped with !ifdef UNINSTALLER_HELPERS_H or !ifdef UNINSTALLER_CODE, paired with !define UNINSTALLER_CODE in test_stub.nsh and uninstaller.nsi? [looks like that matches the robot suggestion.]

The classical approach is a macro like those in toolkit/mozapps/installer/windows/nsis/common.nsh, but from what I can tell the trend was (subconsciously?) moving away from that, it is really verbose and it can mask actually-unused functions.

I could write a patch if desired, but it might be easier for you to do so since I don't have a local Win32 build setup and I'm not sure what approach you'd want to go for, let me know what's best. I could review (r?aurora) if desired, still am in browser-installer-reviewers >:)

(As an aside, NSIS looks like it supports a /WX flag to treat warnings as errors. Maybe we should start using that so this gets caught earlier?)

Assignee: mferreiro → spohl.mozilla.bugs
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: