Skip to content

pubspec.lock is different between Windows and Unix if path reference is used #950

Closed
@DartBot

Description

@DartBot

<img src="https://avatars.githubusercontent.com/u/648527?v=3" align="left" width="96" height="96"hspace="10"> Issue by Fox32
Originally opened as dart-lang/sdk#18097


What steps will reproduce the problem?

  1. Add a dependency to a package by path to pubspec.yaml:

  xyz:
    path: ../xyz

  1. Run pub get

What is the expected output? What do you see instead?

Using Windows, the following part is added to the pubspec.lock:

  xyz:
    description:
      path: "..\xyz"
      relative: true
    source: path
    version: "0.9.0"

If I put the file into version control, I get problems using it in combination with a Unix system, like OSX. OSX expect the following lines:

  xyz:
    description:
      path: "../xyz"
      relative: true
    source: path
    version: "0.9.0"

What version of the product are you using? On what operating system?

Dart Editor version 1.3.0.dev_07_10 (DEV)
Dart SDK version 1.3.0-dev.7.10

Please provide any additional information below.

Maybe the pubspec.yaml should always be outputed with normal '/', even on Windows, to make it more compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions