Skip to content

Path is inconsistent on windows when using git dependency with path dependencies #4314

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
CodeDoctorDE opened this issue Jun 25, 2024 · 2 comments · Fixed by #4315
Closed
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@CodeDoctorDE
Copy link

CodeDoctorDE commented Jun 25, 2024

Environment

  • Dart version (run dart --version): Dart SDK version: 3.4.3 (stable) (Tue Jun 4 19:51:39 2024 +0000) on "windows_x64"
  • OS kind and version (e.g. "Windows 10, version 1809" or "macOS 12.4"): Windows 11
  • Are you using the Chinese community mirror or a corporate firewall? No

Maybe related to #449.

Problem

I use path dependencies in a git (see https://github.com/LinwoodDev/dart_pkgs/blob/b440166c38b927b6520f2835ceffb860b88faa30/packages/material_leap/pubspec.yaml#L18).

When using

material_leap:
    git:
      url: https://github.com/LinwoodDev/dart_pkgs.git
      ref: 0e04c453c2b6d4aa499f79e54bb1c0b7a9b2c42c
      path: packages/material_leap

The .lock file has:

dart_leap:
    dependency: transitive
    description:
      path: "packages\\dart_leap"
      ref: "0e04c453c2b6d4aa499f79e54bb1c0b7a9b2c42c"
      resolved-ref: "0e04c453c2b6d4aa499f79e54bb1c0b7a9b2c42c"
      url: "https://github.com/LinwoodDev/dart_pkgs.git"
    source: git
    version: "1.0.0"

Expected behavior

It should use path: "packages/dart_leap"

Actual behavior

It uses the backslash on windows.

--trace output

There is no error, it only fetches the dart_leap packages every time when using flutter pub get: Changed 1 dependency!.

CodeDoctorDE added a commit to LinwoodDev/Butterfly that referenced this issue Jun 25, 2024
@sigurdm sigurdm added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jun 25, 2024
@sigurdm
Copy link
Contributor

sigurdm commented Jun 25, 2024

Yeah - that is broken

@sigurdm
Copy link
Contributor

sigurdm commented Jul 2, 2024

Seems it passed to mark to get to the next dart 3.5 beta without a cherry pick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants