Coder Social home page Coder Social logo

Github URL invalid? about reflectable.dart HOT 8 CLOSED

google avatar google commented on July 19, 2024
Github URL invalid?

from reflectable.dart.

Comments (8)

sigurdm avatar sigurdm commented on July 19, 2024

Seems like the github URL specified on the pub page is invalid (https://www.github.com/dart- lang/reflectable/reflectable). It gives me a 404 right now. Also the pubspec.yaml file in reflectable refers to this URL.

True - pub does not support specifying a path in a git dependency. We were not aware of this restriction when we wrote the documentation, and never got around changing it. Sorry about that.
The only way to depend on a non-published version that we are aware of is to make a local git checkout, and have a path-dependency on that:

dependencies:
  reflectable:
    path: ../reflectable/reflectable

This is of course suboptimal, and we want to restructure the repo, so the reflectable package is at the root.

When I try running pub get with reflectable: "^0.1.4" in my pubspec.yaml, I get this error:

Package reflectable has no versions that match >=0.1.4 <0.2.0 derived from:

myproject depends on version ^0.1.4
I'm using version 1.12.1. These issues are maybe related?

This is confusing - having a "^0.1.4" dependency should just work
(though we just published 0.1.5!).

I made an empty directory with a pubspec.yaml with the following:

name: testproject
dependencies:
  reflectable: ^0.1.4

And then ran pub get:

+ analyzer 0.26.1+3                                                                                                                                                                           
+ args 0.13.2                                                                                                                                                                                 
+ barback 0.15.2+6                                                                                                                                                                            
+ charcode 1.1.0
+ cli_util 0.0.1+2
+ code_transformers 0.2.9+4
+ collection 1.1.2
+ csslib 0.12.1
+ glob 1.0.5
+ html 0.12.2
+ logging 0.11.1+1
+ package_config 0.1.3
+ path 1.3.6
+ plugin 0.1.0
+ pool 1.1.0
+ reflectable 0.1.5
+ source_maps 0.10.1
+ source_span 1.2.0
+ stack_trace 1.4.2
+ string_scanner 0.1.4
+ utf 0.9.0+2
+ watcher 0.9.7
+ when 0.2.0
+ which 0.1.3
+ yaml 2.1.5
Changed 25 dependencies!
Precompiling dependencies... 
Loading source assets... 
Loading reflectable/src/transform_import transformers... 
Precompiled reflectable.

That is with pub 1.12.1.

Could you try to do something similar?

Thanks

from reflectable.dart.

sigurdm avatar sigurdm commented on July 19, 2024

Sorry I misunderstood the first part of your bug-report.
I thought you were trying to use something like:

dependencies:
  reflectable:
    git: https://www.github.com/dart-lang/reflectable/reflectable

That is a problem we also have been fighting with and want to solve.

The homepage link in the pubspec.yaml (that is used on the pub.dartlang.org page) should not give problems in pub get, but it should be fixed of course. A fix is in: https://codereview.chromium.org/1334243002/

The other problem of:

Package reflectable has no versions that match >=0.1.4 <0.2.0 derived from:

myproject depends on version ^0.1.4

Seems unrelated - this should definitely work, could you try doing it in an empty package?

from reflectable.dart.

zoechi avatar zoechi commented on July 19, 2024

Package reflectable has no versions that match >=0.1.4 <0.2.0 derived from:

myproject depends on version ^0.1.4

These pub messages are often misleading (there is an older open issue for improving this).
Try pub upgrade -v, it might provide additional information about where pub fails resolving the dependencies.

from reflectable.dart.

eernstg avatar eernstg commented on July 19, 2024

Considering that the link on pub.dartlang.org has been corrected and we haven't received further info on the 'Package reflectable has no versions that match' problem, I'll close this issue. Please create a new issue if similar problems still exist.

from reflectable.dart.

brown2rl avatar brown2rl commented on July 19, 2024

Package reflectable has no versions that match >=0.4.0 <0.5.0 derived from: -myproject depends on version ^0.4.0

Pub 1.11.3
Dart VM version 1.11.3 (windows x64)

from reflectable.dart.

zoechi avatar zoechi commented on July 19, 2024

@brown2rl this is just a misleading error message of pub get. reflectable 0.4.0 requires Dart SDK >= 1.12.

from reflectable.dart.

brown2rl avatar brown2rl commented on July 19, 2024

@zoechi updated dart to latest version & all fixed!

from reflectable.dart.

eernstg avatar eernstg commented on July 19, 2024

Very good! ;-)

from reflectable.dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.