Skip to content

Keep the browser executable env override through a settings merge - #2722

Merged
natebosch merged 3 commits into
dart-lang:masterfrom
Yusufihsangorgel:issue-2609-env-override-survives-merge
Aug 10, 2026
Merged

natebosch merged 3 commits into
dart-lang:masterfrom
Yusufihsangorgel:issue-2609-env-override-survives-merge

Conversation

@Yusufihsangorgel

Copy link
Copy Markdown
Contributor

Fixes #2609

The docs half is the easy part. Neither README.md nor
configuration.md named the four variables. Both get them now, briefly
in the first and with the precedence spelled out in the second. The two
links to the browser settings section used the wrong anchor and went
nowhere.

Writing them down turned up a bug. ExecutableSettings.merge dropped
_environmentOverride when it rebuilt the settings, and
customizePlatform merges the defaults with whatever you configured.
Any browser setting at all silenced CHROME_EXECUTABLE, not just
executable:. arguments: on its own was enough. The fix is one line
in merge.

The new test in custom_platform_test.dart configures chrome with
arguments: and points CHROME_EXECUTABLE at a path that does not
exist. Without the fix the inner run launches real Chrome and exits 0.

Two tests in that file now set the variable themselves. 1.23.0
documented that it outranks the config file, and with the override
reaching the getter again, a machine that has it set would run a real
browser instead of the missing path they assert on. They point it at the
same missing path, which keeps their assertion working. What they no
longer cover is the key itself: the getter returns as soon as it finds
the variable and never reads executable:. test_process does expose
includeParentEnvironment, and runTest could pass it through to drop
one variable instead; pinning was the smaller change. Happy to do it
that way if you would rather those two kept testing the key.

ExecutableSettings.merge dropped _environmentOverride, so configuring a
browser at all through override_platforms or define_platforms silently
disabled CHROME_EXECUTABLE and its siblings.

Also document the four variables, which configuration.md never mentioned,
and fix two anchors that pointed at #browser-and-node-js-settings.
The issue asks for a brief mention there alongside the fuller section in
doc/configuration.md.
The environment variable outranks the config file, which the 1.23.0 entry
already documented, so a machine with CHROME_EXECUTABLE set would have
picked a real browser instead of the missing path these two assert on.
The browser tests already set the variable explicitly for the same reason.
@Yusufihsangorgel
Yusufihsangorgel requested a review from a team as a code owner August 10, 2026 18:36

@natebosch natebosch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@natebosch
natebosch merged commit 51463b0 into dart-lang:master Aug 10, 2026
67 checks passed
copybara-service Bot pushed a commit to dart-lang/sdk that referenced this pull request Aug 11, 2026
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/1fd02f7..8be851e):
  8be851e2  Mon Aug 10 13:51:08 2026 +0200  Sarah Zakarias  Bump to 9.0.9 (dart-lang/dartdoc#4278)

http (https://github.com/dart-lang/http/compare/9cb80c7..a9176ac):
  a9176ac  Mon Aug 10 13:27:26 2026 +0200  dart-ecosystem-bot[bot]  Tidy: package:http2 (dart-lang/http#1967)
  9bd9ccb  Sat Aug 8 06:31:37 2026 +0300  Ellet  chore(ok_http): migrate to jni 1.0.0 (dart-lang/http#1943)
  107e4c7  Sat Aug 8 04:54:46 2026 +0300  Yauhen Sampir  [cronet_http] Add DNS configuration options to CronetEngine.build (dart-lang/http#1945)
  55c39c9  Sat Aug 8 07:57:20 2026 +0800  Seven Du  Fix RFC 850 two-digit year parsing (dart-lang/http#1951)
  c71cb6d  Sat Aug 8 01:47:35 2026 +0200  Moritz  Add ecosystem groundskeeper workflow (dart-lang/http#1959)

test (https://github.com/dart-lang/test/compare/dd426d4..55b186d):
  55b186dd  Mon Aug 10 22:18:01 2026 +0200  Sigurd Meldgaard  Fix race conditions in Chrome coverage collection (dart-lang/test#2715)
  51463b0e  Mon Aug 10 21:59:15 2026 +0300  Yusuf İhsan Görgel  Keep the browser executable env override through a settings merge (dart-lang/test#2722)
  b87a2492  Fri Aug 7 12:07:52 2026 -0700  Jacob MacDonald  Enable asserts (dart-lang/test#2719)

tools (https://github.com/dart-lang/tools/compare/f3ec9ed..d644cda):
  d644cdab  Mon Aug 10 11:24:43 2026 +0200  Sigurd Meldgaard  [pub_semver] Parse only pure-digit prerelease/build identifiers as integers (dart-lang/tools#2489)
  df06fed9  Fri Aug 7 15:37:45 2026 -0700  Nate Bosch  Update to Dart 3.10.0 and reformat (dart-lang/tools#2502)
  aec21dae  Fri Aug 7 14:23:11 2026 -0700  Nate Bosch  [code_builder] Minor style fixes (dart-lang/tools#2501)
  1bbcc309  Fri Aug 7 13:56:38 2026 -0700  Nate Bosch  Revert "[code_builder] Add control-flow support (`#2135`)" (dart-lang/tools#2499)
  77607740  Fri Aug 7 01:59:58 2026 +0530  Aman Maurya  Fix MultiChannel inner channel type constraint documentation (dart-lang/tools#2491)
  889787a8  Thu Aug 6 12:56:22 2026 -0700  Nate Bosch  Roll to the latest package:csv (dart-lang/tools#2497)

[email protected]

Change-Id: I4cb9a8839c9ae21c57eca7750c81fdbd1a58a09c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/534341
Auto-Submit: Nate Bosch <[email protected]>
Reviewed-by: Kevin Moore <[email protected]>
Commit-Queue: Kevin Moore <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document CHROME_EXECUTABLE and friends

2 participants