Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Apr 15, 2019

Description

Adds a version file to the bin/internal with the current (arbitrary) hash of the fuchsia sdk to download. Adds the ability to run flutter precache --fuchsia on non-stable branches.

Related Issues

Fixes #31102

Tests

I added the following tests:

  • Updated existing precache test.

Replace this with a list of the tests that you added as part of this PR. A change in behaviour with no test covering it
will likely get reverted accidentally sooner or later. PRs must include tests for all changed/updated/fixed behaviors. See Test Coverage.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@goderbauer goderbauer added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 15, 2019
@jonahwilliams jonahwilliams changed the title [WIP] initial work on downloading Fuchsia core SDK Fuchsia step 1: add SDK version file and artifact download Apr 16, 2019
@jonahwilliams jonahwilliams marked this pull request as ready for review April 16, 2019 01:20
@jonahwilliams jonahwilliams requested a review from zanderso April 16, 2019 01:20
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

lgtm w/ possible cleanup

Copy link
Member

Choose a reason for hiding this comment

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

How hard would it be to split off the web, linux, etc. artifacts into an UnstableDevelopmentArtifacts? Then you could do something like.

for (DevelopmentArtifact artifact in DevelopmentArtifacts.values) {
  if (argResults[artifact.toString()]) {
    requiredArtifacts.add(artifact);
  }
}
if (!FlutterVersion.instance.isStable) {
  for (UnstableDevelopmentArtifact artifact in UnstableDevelopmentArtifacts.values) {
    if (argResults[artifact.toString()]) {
      requiredArtifacts.add(artifact);
    }
  }
}

Or maybe put the unstable development artifacts beyond some dummy marker in DevelopmentArtifacts and then iterate over the indices of DevelopmentArtifacts.values before/after that marker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated DevelopmentArtifacts to be a class with a name/unstable marker, ptal?

@jonahwilliams jonahwilliams force-pushed the fuchsia_sdk_integration_1 branch from 4a2b387 to 8c1903c Compare April 16, 2019 17:17
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

still lgtm w/ a couple more nits.

universal,
static const DevelopmentArtifact universal = DevelopmentArtifact._('universal');

/// THe vaulues of DevelopmentArtifacts.
Copy link
Member

Choose a reason for hiding this comment

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

THe -> The


/// A tag for a set of development artifacts that need to be cached.
enum DevelopmentArtifact {
class DevelopmentArtifact {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe retain a comment here.

@jonahwilliams jonahwilliams merged commit 5228a78 into flutter:master Apr 16, 2019
@jonahwilliams jonahwilliams deleted the fuchsia_sdk_integration_1 branch April 16, 2019 20:25
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

Integrate Fuchsia core sdk into flutter_tool

4 participants