Closed EstebanCardenas closed 2 years ago
It would seem to be duplicated of https://github.com/dart-lang/pub/issues/3390
have same issue
[✓] Flutter (Channel stable, 3.0.5, on Linux 5.18.14-arch1-1, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
Background: Same issue: Tried on both Flutter 3.0.4 & 3.0.5; Looks like https://github.com/dart-lang/pub/issues/3390. Trying to use the same mono_repo structure as https://github.com/dart-lang/build, but with a private repo.
Oddly, this did not recreate entirely consistently, at some points, git references seem to work? Perhaps worth mentioning that we also use globally installed package Melos
, like (https://github.com/dart-lang/pub/issues/3520), The original bug had mentioned issues with dependency overrides, which we also use.....
Reproduction:
I noticed the issue while using git ref's in a parent pubspec.yml's dependency_overrides:
to a separate private git mono repo of internal packages. We see this error when running pub get
in the parent app, and also when running it for packages in the mono repo that depend on sibling packages (by git reference to the mono repo).
ex.)
Parent - Repo - A
App -> lib_a, lib_b
Common - Mono Repo - B
lib_a -> git@common...., path: /lib_b
lib_b
Investigation:
// Relative paths coming from pubspecs that are not on the local file
// system aren't allowed. This can happen if a hosted or git dependency
// has a git dependency.
This comment has me feeling like I've broken some invariant assumption; Having done exactly that. Can I not reference a repo by git url, that internally also references itself by git url? If so, how I do dependencies within a private git mono-repo?
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-x64, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] HTTP Host Availability
Illegal scheme character error thrown when including a git dependency in the
pubspec.yaml
file.Pubspec.yaml file:
Error:
Stack trace: