Install function "GetPostUpdateTarget" not referenced
Categories
(Firefox :: Installer, defect, P3)
Tracking
()
| 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
| Reporter | ||
Updated•2 months ago
|
| Reporter | ||
Updated•2 months ago
|
Updated•2 months ago
|
Comment 1•2 months ago
|
||
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.
Comment 2•2 months ago
|
||
| frontend-triage | ||
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.
Updated•2 months ago
|
Updated•2 months ago
|
Comment 3•2 months ago
|
||
Right, I don't remember if I expected that or not. I think this was a conflict between two places:
uninstaller_helper.nshwouldn't have this warning, but (if I recall) it wouldn't work in tests, and I wanted coverage for this.postupdate_helper.nshhas 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?)
Comment 4•2 months ago
|
||
Set release status flags based on info from the regressing bug 2030812
Comment 5•1 month ago
|
||
I'm guessing wontfix for 157 if there isn't a patch in progress already
Comment 6•1 month ago
|
||
Set release status flags based on info from the regressing bug 2030812
Updated•1 month ago
|
| Reporter | ||
Updated•27 days ago
|
| Assignee | ||
Comment 7•22 days ago
|
||
Comment 8•19 days ago
|
||
(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.nshwouldn't have this warning, but (if I recall) it wouldn't work in tests, and I wanted coverage for this.postupdate_helper.nshhas 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_Hor!ifdef UNINSTALLER_CODE, paired with!define UNINSTALLER_CODEin 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
/WXflag to treat warnings as errors. Maybe we should start using that so this gets caught earlier?)
Description
•