Closed Bug 1769405 Opened 2 years ago Closed 2 years ago

mach bootstrap should check the mismatch between the default mozconfig file and the selected build target

Categories

(Firefox Build System :: Bootstrap Configuration, task)

task

Tracking

(firefox103 fixed)

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Regressed 1 open bug)

Details

Attachments

(4 files)

Bug 1632874 introduced the feature to automatically generate the default mozconfig file for the selected build target,
but that causes confusion in the following scenario:

  1. run bootstrap.py
  2. select "Firefox for Desktop Artifact Mode"
  3. run ./mach build and get artifact build
  4. run ./mach bootstrap
  5. select "Firefox for Desktop"
  6. run ./mach build, but still get artifact build

the issue is that, the mozconfig file for browser_artifact_mode is automatically generated at step 2,
but the config is not updated at step 5,
and also no message is shown because the expected mozconfig is empty

Possible options are:

  1. automatically rewrite the default mozconfig for basic case (browser vs browser_artifact_mode)
  2. warn about the mismatch
  3. add yet another mozconfig file path (e.g. mozconfig.bootstrap-generated) that's managed by bootstrap, and use it only when no other mozconfig is found, and always rewrite the file for the selected target

Also, if the config is automatically rewritten, it's better using different MOZ_OBJDIR between artifact mode and non-artifact mode

When ./mach bootstrap is called with the default mozconfig file,
verify the content matches the selected build target, and if not,
show a warning and ask whether to overwrite or not.

I'll take basically 2, with proposing the overwrite (y/n question), not automatically.

Attachment #9276593 - Attachment description: Bug 1769405 - Detect mismatch between the default mozconfig and the selected build target. r?#firefox-build-system-reviewers! → Bug 1769405 - Part 3: Detect mismatch between the default mozconfig and the selected build target. r?#firefox-build-system-reviewers!
Attachment #9277672 - Attachment description: Bug 1769405 - Part 2: Return application and artifact-builds options from MozbuildObject.get_mozconfig_and_target. r?glandium! → Bug 1769405 - Part 3: Return application and artifact-builds options from MozbuildObject.get_mozconfig_and_target. r?glandium!
Attachment #9276593 - Attachment description: Bug 1769405 - Part 3: Detect mismatch between the default mozconfig and the selected build target. r?#firefox-build-system-reviewers! → Bug 1769405 - Part 4: Detect mismatch between the default mozconfig and the selected build target. r?#firefox-build-system-reviewers!
Attachment #9277672 - Attachment description: Bug 1769405 - Part 3: Return application and artifact-builds options from MozbuildObject.get_mozconfig_and_target. r?glandium! → Bug 1769405 - Part 3: Return application and artifact-builds options from MozbuildObject.get_base_mozconfig_info. r?glandium!
Attachment #9277672 - Attachment description: Bug 1769405 - Part 3: Return application and artifact-builds options from MozbuildObject.get_base_mozconfig_info. r?glandium! → Bug 1769405 - Part 3: Return project and artifact-builds options from MozbuildObject.get_base_mozconfig_info. r?glandium!
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/5f8e0141a0ed
Part 1: Move artifact build option to build/moz.configure/init.configure. r=glandium
https://hg.mozilla.org/integration/autoland/rev/9099ba749b1f
Part 2: Rename mozconfig_and_target to base_mozconfig_info and return dictionary. r=glandium
https://hg.mozilla.org/integration/autoland/rev/6de9495c467d
Part 3: Return project and artifact-builds options from MozbuildObject.get_base_mozconfig_info. r=glandium
https://hg.mozilla.org/integration/autoland/rev/813147df341c
Part 4: Detect mismatch between the default mozconfig and the selected build target. r=firefox-build-system-reviewers,glandium

Backed out 4 changesets (Bug 1769405) for causing regression in Bug 1774100.
Backout link

Status: RESOLVED → REOPENED
Flags: needinfo?(arai.unmht)
Resolution: FIXED → ---
Target Milestone: 103 Branch → ---
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/24720e4b2531
Part 1: Move artifact build option to build/moz.configure/init.configure. r=glandium
https://hg.mozilla.org/integration/autoland/rev/014b13c05e48
Part 2: Rename mozconfig_and_target to base_mozconfig_info and return dictionary. r=glandium
https://hg.mozilla.org/integration/autoland/rev/b998b1a573f8
Part 3: Return project and artifact-builds options from MozbuildObject.get_base_mozconfig_info. r=glandium
https://hg.mozilla.org/integration/autoland/rev/16420ba4d291
Part 4: Detect mismatch between the default mozconfig and the selected build target. r=firefox-build-system-reviewers,glandium
Flags: needinfo?(arai.unmht)
Regressions: 1852664
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: