google / pub_cache Goto Github PK
View Code? Open in Web Editor NEWA library to reflect on the local pub cache.
Home Page: https://pub.dartlang.org/packages/pub_cache
License: BSD 3-Clause "New" or "Revised" License
A library to reflect on the local pub cache.
Home Page: https://pub.dartlang.org/packages/pub_cache
License: BSD 3-Clause "New" or "Revised" License
Failing travis!
https://travis-ci.org/dart-lang/pub_cache/builds/395141777#L646
Good afternoon everyone please I am facing a problem running my flutter app here is the massage I always get
Your application could not be compiled, because it’s dependencies could not be established.
Could not read “C:\flutter.pub-cache\hosted\pub.dartlang.org\vector_math-2.0.8\lib\hash.dart” when determining Dart dependencies
Yes, apparently it can happen. I had a pubspec.yaml file in my .pub-cache/git that did not have a version.
It was async_await:
name: async_await
description: Compile-time support for "async/await" syntax in Dart.
dependencies:
analyzer: '>=0.22.4 <0.23.0'
barback: '>=0.15.0 <0.16.0'
dev_dependencies:
http: any
unittest: any
Which throws this error:
Uncaught Error: Invalid argument(s)
Stack Trace:
#0 _JSSyntaxRegExp.firstMatch (dart:core-patch/regexp_patch.dart:142)
#1 Version.Version.parse (package:pub_semver/src/version.dart:111)
#2 GitDirectoryPackageRef.GitDirectoryPackageRef (package:pub_cache/src/impl.dart:119)
#3 PubCache._parse.<anonymous closure> (package:pub_cache/pub_cache.dart:121)
#4 MappedIterator.moveNext (dart:_internal/iterable.dart:390)
#5 List.addAll (dart:core-patch/growable_array.dart:183)
#6 PubCache._parse (package:pub_cache/pub_cache.dart:122)
#7 PubCache.PubCache (package:pub_cache/pub_cache.dart:41)
#8 _doLoadWhenSnapshot (package:dartdoc/resource_loader.dart:38)
#9 _doLoad (package:dartdoc/resource_loader.dart:24)
#10 loadAsString (package:dartdoc/resource_loader.dart:16)
#11 main.<main_async_body> (file:///Users/sethladd/Code/dartdoc/bin/dart_resource_loader.dart:4)
#12 Future.Future.microtask.<anonymous closure> (dart:async/future.dart:144)
#13 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#14 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#15 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#16 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:886)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)
Suggest we tolerate pubspec's without versions in them.
Is there a simple way to get this answer?
pub global activate --source path <path>
Hi - we intend to discontinue this package. It's no longer in use by the Dart team's tooling packages and has only limited use in the ecosystem (see https://pub.dev/packages?q=dependency%3Apub_cache).
Some possible recourse for people who are using this package:
dart pub cache list
(that command didn't exist when this package was created)And as a heads up, newer Dart SDKs (2.19 and later) use pub.dev
as the domain name in the cache dir path, instead of pub.dartlang.org
.
.pub-cache/git
Currently, users in China get packages from a mirror. They must set their PUB_HOSTED_URL to https://flutter-io.cn. This package hardcores PUB_HOSTED_URL to pub.dartlang.org.
I'm happy to make the change to https://github.com/dart-lang/pub_cache/blob/master/lib/pub_cache.dart#L112, but is there anything else I need to be aware of? My plan was to grab the value from Platform.environment
, default it to pub.dartlang.org
if no env variable exists.
This needs a publish (of 0.2.1
) in order to be ready for Dart 2.
I'm going to try to use this for dartdoc
Hi! Windows user here. dart 2.9.3
Installing aqueduct, i noticed that the method PubCache.getSystemCacheLocation()
is searching for my pub folder by the 'APPDATA' key. However, in my system, Platform.Enviroment['APPDATA'] return the "\roaming" folder, whereas my pub cache is actually located at "\local" folder.
There is another key, Platform.Enviroment['LOCALAPPDATA'], the correctly returns the folder. There is no 'PUB_CACHE' key.
https://travis-ci.org/dart-lang/pub_cache/builds/414182352
Due to pkg:fixup?
I have a lot of packages in the /Users/xxx/.pub-cache/hosted/pub.dev/
, but the getPackageRefs
and getAllPackageVersions
return empty collection.
var cache = PubCache();
var refs = cache.getPackageRefs();
var versions = cache.getAllPackageVersions("<the package name i.e. libgit2dart>");
Versions:
I tried chmod -R 777 ~/.pub-cache
just in case it's a permission issue, but still didn't work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.