Skip to content

Pub get stuck installing packages when git-lfs not installed yet #3603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
westito opened this issue Oct 14, 2022 · 1 comment
Closed

Pub get stuck installing packages when git-lfs not installed yet #3603

westito opened this issue Oct 14, 2022 · 1 comment

Comments

@westito
Copy link

westito commented Oct 14, 2022

Environment

  • Dart SDK version: 2.18.2 (stable) (Tue Sep 27 13:24:11 2022 +0200) on "macos_arm64"
  • macOS 12.6
  • Are you using the Chinese community mirror or a corporate firewall? No

Problem

When package referenced as git repository and uses git-lfs pub get will fail also after installation.

name: app
description: app

publish_to: 'none'

version: 2.0.0+1050001

environment:
  sdk: '>=2.18.2'
  flutter: '>=3.3.4'

dependencies:
  flutter:
    sdk: flutter
  widgetbook: ^2.4.1
  widgetbook_annotation: ^2.1.0

dev_dependencies:
  build_runner: ^2.3.0
  widgetbook_generator: ^2.4.1

dependency_overrides:
  widgetbook:
    git:
      url: [email protected]:widgetbook/widgetbook.git
      path: packages/widgetbook
      ref: main

Expected behavior

  • pub get reverts package install when checkout failed

Actual behavior

  • An invalid package remains in the pub-cache and pub get always failing until ~/.pub-cache folder is deleted

First attempt

westito@Westito-MBP1621 app % flutter pub get
Warning: You are using these overridden dependencies:
! widgetbook 2.4.1 from git [email protected]:widgetbook/widgetbook.git at 1721da in packages/widgetbook
Git error. Command: `git clone /Users/westito/.pub-cache/git/cache/widgetbook-adba694fa42067ee6d114a5ff69c73a2c76f654d /Users/westito/.pub-cache/git/widgetbook-1721da839411797f2dd9c728853590b96948e4cc`
stdout: 
stderr: Cloning into '/Users/westito/.pub-cache/git/widgetbook-1721da839411797f2dd9c728853590b96948e4cc'...
done.
git-lfs filter-process: git-lfs: command not found
fatal: the remote end hung up unexpectedly
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

exit code: 128
pub get failed (server unavailable) -- attempting retry 1 in 1 second...
Warning: You are using these overridden dependencies:
! widgetbook 2.4.1 from git [email protected]:widgetbook/widgetbook.git at 1721da in packages/widgetbook
Could not find a file named "pubspec.yaml" in "/Users/westito/.pub-cache/git/widgetbook-1721da839411797f2dd9c728853590b96948e4cc/packages/widgetbook".
Running "flutter pub get" in app...                                  
pub get failed (66; Could not find a file named "pubspec.yaml" in "/Users/westito/.pub-cache/git/widgetbook-1721da839411797f2dd9c728853590b96948e4cc/packages/widgetbook".)

After install git-lfs

westito@Westito-MBP1621 app % flutter pub get             
Warning: You are using these overridden dependencies:
! widgetbook 2.4.1 from git [email protected]:widgetbook/widgetbook.git at 1721da in packages/widgetbook
Could not find a file named "pubspec.yaml" in "/Users/westito/.pub-cache/git/widgetbook-1721da839411797f2dd9c728853590b96948e4cc/packages/widgetbook".
Running "flutter pub get" in app...                                  
pub get failed (66; Could not find a file named "pubspec.yaml" in "/Users/westito/.pub-cache/git/widgetbook-1721da839411797f2dd9c728853590b96948e4cc/packages/widgetbook".)
@sigurdm
Copy link
Contributor

sigurdm commented Nov 3, 2022

Closing as a duplicate of #1433

We want to support git lfs, but haven't gotten around to it yet.

@sigurdm sigurdm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants