Skip to content

Conversation

@andrewkolos
Copy link
Contributor

@andrewkolos andrewkolos commented Nov 3, 2024

Experiment towards reducing dependence on internal/engine.version

Pre-launch checklist

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 3, 2024
@andrewkolos andrewkolos force-pushed the experiment-with-using-engine-stamp-instead-of-engine-version branch 4 times, most recently from 9876e08 to 1184ccd Compare November 5, 2024 18:56
auto-submit bot pushed a commit that referenced this pull request Nov 5, 2024
…tructor (#158201)

While doing some hacking on `Cache` in #158081, I noticed that [`Cache.test`](https://github.com/flutter/flutter/blob/de9318275391a6d2f10ae33c576f4113b25fd156/packages/flutter_tools/lib/src/cache.dart#L139) allows the caller to tell Cache to use some given directory as the flutter root (instead of depending on the static global [`Cache.flutterRoot`](https://github.com/flutter/flutter/blob/4f3976a4f2b722d26c3353158dcd26590859dde0/packages/flutter_tools/lib/src/cache.dart#L206)). This has a default value, `/cache`. However, `/cache` is an unintuitive name for the root directory of a Flutter installation.

This led to confusion when updating some tests. I wanted to create `/bin/cache/engine-dart-sdk.stamp` for tests, but in reality I needed to create `/cache/bin/cache/engine-dart-sdk.stamp`.

This PR changes this default to the current directory of the file system (which I'm guessing is `/` for all intents and purposes). 

<details>

<summary> Pre-launch checklist </summary> 

</details>
@andrewkolos andrewkolos force-pushed the experiment-with-using-engine-stamp-instead-of-engine-version branch from b469fca to 71db5d4 Compare November 5, 2024 23:09
@andrewkolos andrewkolos force-pushed the experiment-with-using-engine-stamp-instead-of-engine-version branch from 067e754 to 6f739e4 Compare December 16, 2024 20:03
@andrewkolos andrewkolos force-pushed the experiment-with-using-engine-stamp-instead-of-engine-version branch from 23756a1 to a84be69 Compare December 16, 2024 22:03
expect(visitor.containsNewDepfile, false);
}));

test('Non-local engine builds use the engine.version file as an Artifact dependency', () => testbed.run(() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a testing a caching optimization for builds. This can be restored later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant