Skip to content

Flutter Tool reports errors on content-hash #171237

@jtmcdole

Description

@jtmcdole

Enabling content hashing for the engine artifacts locally leads to warning from tool about missing git objects.

setup:

mv bin/cache bin/cach.backup # important as tool doens't redownload dart sdk
export FLUTTER_PREBUILT_ENGINE_VERSION=$(./bin/internal/content_aware_hash.sh)
flutter doctor

output:

Failed to find the latest git commit date: VersionCheckError: Command exited with code 128: git -c log.showSignature=false log 728dc653e5efeb64175acce4bd2d7090781df70a -n 1 --pretty=format:%ad --date=iso
Standard out:
Standard error: fatal: bad object 728dc653e5efeb64175acce4bd2d7090781df70a

This is in the version.dart when trying to get the engineCommitDate:

  late final String engineCommitDate = _gitCommitDate(
    gitRef: engineRevision,
    lenient: true,
    workingDirectory: flutterRoot,
  );

A simple approach would be to look for the log of the last change made to [DEPS, engine/**, bin/internal/release-candidate-branch.version].

git  -c log.showSignature=false log -n 1 --pretty=format:%ad --date=iso -- DEPS engine bin/internal/release-candidate-branch.version

Another option, which could remove git from the pipeline, is recording this information at artifact build time and having it downloaded (e.g. bin/cache/engine_info.yml).

Metadata

Metadata

Assignees

No one assigned

    Labels

    fyi-toolFor the attention of Flutter Tool teamr: fixedIssue is closed as already fixed in a newer versionteam-infraOwned by Infrastructure teamtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy