Closed Bug 1880746 Opened 1 year ago Closed 1 year ago

config/recurse.mk:93: target `intl/bidi/export' given more than once in the same rule.

Categories

(Firefox Build System :: General, defect, P3)

defect

Tracking

(firefox125 fixed)

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(4 files)

running ./mach build shows the following warning message

.../mozilla-unified/config/recurse.mk:93: target `intl/bidi/export' given more than once in the same rule.

This comes from intl/bidi appears in export_dirs twice in OBJDIR/root.mk, which is a kind of regression from bug 1824671 patch 11.

OBJDIR/root.mk

export_dirs :=  build build/rust/mozbuild config js/src js/src/shell js/src/jsapi-tests js/src/tests js/src/build js/src/frontend js/src/gc js/src/jit js/src/wasm intl/bidi memory/build memory/replace/logalloc/replay mozglue/baseprofiler mozglue/build config/external/ffi xpcom/xpidl config/external/wasm2c_sandbox_compiler media/libvpx media/libopus media/libtheora media/mp4parse-rust xpcom/idl-parser/xpidl xpcom/base xpcom/ds xpcom/components xpcom/build modules/libpref intl/bidi intl/hyphenation/glue intl/l10n intl/locale intl/unicharutil/util netwerk/base/mozurl netwerk/base/rust-helper netwerk/socket/neqo_glue ipc/app ipc/ipdl ipc/ipdl/test/ipdl testing/specialpowers gfx/webrender_bindings gfx/wgpu_bindings dom/base dom/bindings dom/bindings/test dom/fs/parent dom/media third_party/libwebrtc/experiments/registered_field_trials_header_gn dom/midi/midir_impl dom/origin-trials layout/style layout/style/test/gtest layout/generic accessible/mac accessible/base accessible/xpcom tools/profiler toolkit/components/glean toolkit/components/telemetry toolkit/components/nimbus toolkit/crashreporter toolkit/crashreporter/client toolkit/crashreporter/mozannotation_client toolkit/crashreporter/mozannotation_server toolkit/locales toolkit/mozapps/update/updater toolkit/mozapps/update/updater/updater-xpcshell toolkit/mozapps/update/tests toolkit/library/build browser browser/locales browser/themes/shared/app-marketplace-icons browser/app browser/tools/mozscreenshots/mozscreenshots/extension

The list is generated by the following line:

https://searchfox.org/mozilla-central/rev/1aaacaeb4fa3aca6837ecc157e43e947229ba8ce/python/mozbuild/mozbuild/backend/recursivemake.py#849-851

for tier, filter in filters:
    all_dirs = self._traversal.traverse("", filter)
    root_mk.add_statement("%s_dirs := %s" % (tier, " ".join(all_dirs)))

possible solution is to remove duplicate in traverse method, or after that

https://searchfox.org/mozilla-central/rev/1aaacaeb4fa3aca6837ecc157e43e947229ba8ce/python/mozbuild/mozbuild/backend/recursivemake.py#292-296

def traverse(self, start, filter=None):
    """
    Iterate over the filtered subdirectories, following the traditional
    make traversal order.
    """

The real problem is that intl/bidi is recursed twice (as in, added to DIRS twice), and /that/ should be fixed.

Same is true of intl/components, BTW.

Attachment #9380722 - Attachment description: Bug 1880746 - Remove duplicate entries from root.mk *_dirs list. r?#firefox-build-system-reviewers! → Bug 1880746 - Part 2: Throw error when same directory is added to DIRS twice. r?#firefox-build-system-reviewers!
Attachment #9380722 - Attachment description: Bug 1880746 - Part 2: Throw error when same directory is added to DIRS twice. r?#firefox-build-system-reviewers! → Bug 1880746 - Part 4: Throw error when same directory is added to DIRS twice. r?#firefox-build-system-reviewers!

Why not make this not a warning-worthy problem? If we can tell that it's a dupe, can't we just not re-traverse it?

The change to ANGLE makes it somewhat more fragile to changes there, since now we have "spooky action at a distance" between the generator/updater and the moz.build.
It's not a huge engineering risk to hardcode this expectation, but generally being tolerant to inputs and strict on outputs is the goal, and traversal is usually expected to be resilient to duplicate links.

(In reply to Kelsey Gilbert [:jgilbert] from comment #7)

Why not make this not a warning-worthy problem? If we can tell that it's a dupe, can't we just not re-traverse it?

:glandium, can I have your opinion here?

Flags: needinfo?(mh+mozilla)

Part 4 is making it an error already.

Flags: needinfo?(mh+mozilla)

(BTW, the warning was there, and it has been for years, which shows how effective warnings are)

Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/4c90f0d5fa7a Part 1: Add intl dirs from js/src/moz.build only when the build target is JS shell. r=firefox-build-system-reviewers,glandium https://hg.mozilla.org/integration/autoland/rev/8fa3d22936fe Part 2: Simplify angle moz.build DIRS dependencies. r=firefox-build-system-reviewers,jgilbert,glandium https://hg.mozilla.org/integration/autoland/rev/50ce64203a85 Part 3: Remove duplicate DIRS from js/app.mozbuild. r=firefox-build-system-reviewers,glandium https://hg.mozilla.org/integration/autoland/rev/6031aa0ce1d7 Part 4: Throw error when same directory is added to DIRS twice. r=firefox-build-system-reviewers,glandium
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: