Skip to content

Remove many absolute paths from build commands.#187765

Merged
rmacnak-google merged 1 commit into
flutter:masterfrom
rmacnak-google:fix-abs-paths
Jun 22, 2026
Merged

Remove many absolute paths from build commands.#187765
rmacnak-google merged 1 commit into
flutter:masterfrom
rmacnak-google:fix-abs-paths

Conversation

@rmacnak-google

@rmacnak-google rmacnak-google commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Relative paths are preferred for reproducible builds.

They are also needed for remote build steps. The current RBE steps (only clang compiles) are already free of absolute paths, but it is easier to verify the whole build.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 9, 2026
@github-actions github-actions Bot added platform-android Android applications specifically engine flutter/engine related. See also e: labels. platform-fuchsia Fuchsia code specifically platform-web Web applications specifically e: impeller Impeller rendering backend issues and features requests team-android Owned by Android platform team team-web Owned by Web platform team labels Jun 10, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 10, 2026
@rmacnak-google rmacnak-google added the CICD Run CI/CD label Jun 10, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 10, 2026
@rmacnak-google rmacnak-google added the CICD Run CI/CD label Jun 10, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 11, 2026
@rmacnak-google rmacnak-google added the CICD Run CI/CD label Jun 11, 2026
@rmacnak-google rmacnak-google marked this pull request as ready for review June 15, 2026 16:28
@rmacnak-google rmacnak-google requested a review from a team as a code owner June 15, 2026 16:28
@rmacnak-google rmacnak-google requested review from gmackall and removed request for a team June 15, 2026 16:28

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates various GN build files to pass root_build_dir as the second argument to rebase_path(), ensuring paths are rebased consistently relative to the build directory. It also removes the unused canonical_path helper function in create_macos_binary.py. Feedback suggests replacing a relative path traversal (../../../) with the standard GN source root identifier (//) in engine/src/flutter/lib/snapshot/BUILD.gn to improve robustness.

Comment thread engine/src/flutter/lib/snapshot/BUILD.gn
@reidbaker reidbaker requested review from bkonyi and gaaclarke June 16, 2026 21:23
@reidbaker

Copy link
Copy Markdown
Contributor

from triage: @gaaclarke you dont need to review only find someone with engine rbe experience to review on behalf of the engine.

@reidbaker reidbaker added the fyi-engine For the attention of Engine team label Jun 16, 2026

@gaaclarke gaaclarke 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.

This PR does what it says it will do, that aspect looks good to me.

but it is easier to verify the whole build.

Are we going to verify this somehow? That seems hard to do. What is stopping the next guy from introducing abs paths, and does it matter if there is no discernible difference?

I don't know if it's wise to try to enforce this if it isn't enforced somehow technically and has no difference to the process.

@rmacnak-google

Copy link
Copy Markdown
Contributor Author

Are we going to verify this somehow? That seems hard to do.

It's actually straightforward to check for the working directory in the full command list. I have the Dart build fully fixed and automatically verified. There are still some broken commands in Flutter where the naive fix seems to break the build, so I can't yet add such a check here, but manual inspection of the build log is much easier now. I also haven't found wherever Flutter is doing an incremental build check, which is the natural place to add the new check.

@gaaclarke gaaclarke 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.

lgtm modulo filing an issue for the follow up of automated verification, sounds like we have a way to do that.

@rmacnak-google rmacnak-google added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD and removed CICD Run CI/CD labels Jun 17, 2026
@fluttergithubbot

Copy link
Copy Markdown
Contributor

An existing Git SHA, 170f62cc0f890fe4e2c94ff9bf490caecc4f6687, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

@rmacnak-google rmacnak-google enabled auto-merge June 17, 2026 16:37
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 17, 2026
@auto-submit

auto-submit Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/187765, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 17, 2026
@rmacnak-google rmacnak-google added the CICD Run CI/CD label Jun 17, 2026
Relative paths are prefered for reproducible builds.
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 22, 2026
@rmacnak-google rmacnak-google added the CICD Run CI/CD label Jun 22, 2026
@rmacnak-google rmacnak-google added this pull request to the merge queue Jun 22, 2026
Merged via the queue into flutter:master with commit 399ef84 Jun 22, 2026
195 checks passed
@rmacnak-google rmacnak-google deleted the fix-abs-paths branch June 22, 2026 21:14
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jun 23, 2026
flutter/flutter@e228771...87224e0

2026-06-23 engine-flutter-autoroll@skia.org Roll Dart SDK from 5cae7f9ada62 to 3a66ea7b9aaa (1 revision) (flutter/flutter#188379)
2026-06-23 engine-flutter-autoroll@skia.org Roll Dart SDK from 1e6c246bb73a to 5cae7f9ada62 (2 revisions) (flutter/flutter#188370)
2026-06-23 engine-flutter-autoroll@skia.org Roll Skia from 766f21ae61dc to ffac3e91fbc7 (24 revisions) (flutter/flutter#188366)
2026-06-23 737941+loic-sharma@users.noreply.github.com [Windows] Add public API to post task to platform thread (flutter/flutter#187365)
2026-06-23 engine-flutter-autoroll@skia.org Roll Dart SDK from 7ab0179ce4d4 to 1e6c246bb73a (1 revision) (flutter/flutter#188354)
2026-06-23 robert.ancell@canonical.com Fix byte/character offset confusion in FlAccessibleTextField (flutter/flutter#188138)
2026-06-22 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from Lm76V7lvxVA0r1De5... to RymJjIj7dd5vQ3Cnh... (flutter/flutter#188353)
2026-06-22 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#188355)
2026-06-22 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#188331)
2026-06-22 engine-flutter-autoroll@skia.org Roll Skia from 5fbb9bbd889c to 766f21ae61dc (2 revisions) (flutter/flutter#188184)
2026-06-22 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 6.0.3 to 7.0.0 in the all-github-actions group (flutter/flutter#188350)
2026-06-22 robert.ancell@canonical.com Use g_signal_connect_object in the Linux embedder (flutter/flutter#188241)
2026-06-22 robert.ancell@canonical.com Disconnect from parent window signal when view is destroyed (flutter/flutter#185521)
2026-06-22 rmacnak@google.com Remove many absolute paths from build commands. (flutter/flutter#187765)
2026-06-22 haiderqadir.hq@gmail.com Fix spelling mistake in documentation (wether → whether) (flutter/flutter#186141)
2026-06-22 engine-flutter-autoroll@skia.org Roll Dart SDK from a748c4b15399 to 7ab0179ce4d4 (2 revisions) (flutter/flutter#188332)
2026-06-22 robert.ancell@canonical.com [Linux] Move compositor shader into its own GObject (flutter/flutter#188144)
2026-06-22 bkonyi@google.com Add agent skills for orchestrating cherry-picks to stable and beta channels (flutter/flutter#187860)
2026-06-22 engine-flutter-autoroll@skia.org Roll Packages from c516c92 to cd5194a (1 revision) (flutter/flutter#188312)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
Relative paths are preferred for reproducible builds.

They are also needed for remote build steps. The current RBE steps (only
clang compiles) are already free of absolute paths, but it is easier to
verify the whole build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels. fyi-engine For the attention of Engine team platform-android Android applications specifically platform-fuchsia Fuchsia code specifically platform-web Web applications specifically team-android Owned by Android platform team team-web Owned by Web platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants