dart-lang / pub-dev

The pub.dev website
https://pub.dev
BSD 3-Clause "New" or "Revised" License
782 stars 147 forks source link

Packages can be published with git: dependencies #3467

Closed stuartmorgan closed 4 years ago

stuartmorgan commented 4 years ago

The package https://pub.dev/packages/file_access has, as of the current published version at least, a git: dependency in its pubspec.yaml. Issues:

I would expect that this would prevent publishing given the first bullet point, but if it's allowed on purpose it seems like it should be flagged at least per the other two bullet points.

isoos commented 4 years ago

@stuartmorgan: thanks for reporting.

I thought that we have blocked the upload of packages with git dependencies, but apparently we are missing something. For our own reference here are the pointers for pub and pana that should be handling this:

isoos commented 4 years ago

@stuartmorgan: while the package's git repository contains a pubspec.yaml that has a git dependency, the uploaded package archive has it commented out:

dependencies:
  flutter:
    sdk: flutter
  file_picker: ^1.5.0+2
  image_picker: ^0.6.3+4
  # file_chooser:
  #   git:
  #     url: https://github.com/google/flutter-desktop-embedding
  #     path: plugins/file_chooser
stuartmorgan commented 4 years ago

Ah, I didn't think to check the archive's pubspec. Sorry for the false alarm!