Commit Graph

36 Commits

Author SHA1 Message Date
lrn@google.com 9b23dff467 Reapply "Rename mappedBy to map."
This reverts commit r17907.

TBR.

Review URL: https://codereview.chromium.org//12090093

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17918 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 15:12:56 +00:00
floitsch@google.com b1a118d5ce Revert "Rename mappedBy to map."
This reverts commit 17899.

Review URL: https://codereview.chromium.org//12087103

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17907 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 14:02:27 +00:00
lrn@google.com 0dc2f4b1ba Rename mappedBy to map.
Retain a deprecated mappedBy for now.
Change return type of mappedBy, skip and take on List to Iterable.

BUG= http://dartbug.com/8063
BUG= http://dartbug.com/8064
BUG= http://dartbug.com/6739
BUG= http://dartbug.com/7982

Review URL: https://codereview.chromium.org//12086062

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17899 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 12:37:13 +00:00
rnystrom@google.com 079402c3ae Get rid of RootSource.
This was a sort of hackish source only used internally during
version solving. But it causes a couple of subtle bugs because it
never gets registered with the SourceRegistry. That in turn makes
toString() fail on any PackageId with that source since it relies
on the Source being registered.

The simplest fix is to just remove the hacked source and have a
null source in PackageId/Ref mean "root" and handle it specially.

Review URL: https://codereview.chromium.org//12047096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17646 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-25 18:22:29 +00:00
floitsch@google.com 1febeb689a Move some core classes to collection library.
Review URL: https://codereview.chromium.org//11867024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17352 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-21 13:34:02 +00:00
lrn@google.com 4868ee2110 Remove Futures class, move methods to Future.
Optimize Future.forEach, Future.delay.

Review URL: https://codereview.chromium.org//11865005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16954 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 09:46:45 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
rnystrom@google.com 12b11b4cc0 Convert /** comments to /// in pub.
Previously, it was a mix of both styles. Now it's consistent. :)

Review URL: https://codereview.chromium.org//11638010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16354 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 02:04:28 +00:00
rnystrom@google.com e5567d556b Add some relatively innocuous logging.
Review URL: https://codereview.chromium.org//11464032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15876 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-08 02:57:00 +00:00
rnystrom@google.com e3bc775e68 Revert "Add logging system to pub and sprinkle some logging in."
This reverts commit 60468a1a0854389bb3f460cf2368f22013f1af31.

BUG=

Review URL: https://codereview.chromium.org//11472016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15830 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 00:48:12 +00:00
rnystrom@google.com 578c415134 Add logging system to pub and sprinkle some logging in.
We'll have to tune which things we log over time, but this covers
most IO operations which is where almost all of our problems come
from.

This patch also means that going forward you should no longer call
print() or printError() (which is gone) directly. Instead:

print() -> log.message()
printError() -> log.error()

That ensures all messages will correctly get added to the log's
transcript.

Review URL: https://codereview.chromium.org//11437019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15827 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 00:29:23 +00:00
rnystrom@google.com 39dc1b5323 Better error messages for dependency conflicts.
BUG=

Review URL: https://codereview.chromium.org//11445034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15768 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 02:04:30 +00:00
rnystrom@google.com ce5a461318 Update Version to latest language changes.
Review URL: https://codereview.chromium.org//11308236

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15421 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 22:38:03 +00:00
rnystrom@google.com 26e59cf859 Fix error reporting on invalid command line args.
It would crash in a few cases if you didn't pass in a valid command
Also fixed a few unrelated warnings since a warning we learned to
ignore was masking the original issue. :(

Review URL: https://codereview.chromium.org//11363249

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14927 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 23:22:35 +00:00
floitsch@google.com 2e778387b3 Make getKeys, getValues getters (keys, values).
Review URL: https://codereview.chromium.org//11267018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14093 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 19:22:11 +00:00
floitsch@google.com 09f6d09d88 Make isEmpty a getter.
Review URL: https://codereview.chromium.org//11238035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14022 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 15:04:32 +00:00
rnystrom@google.com 1bb574612e Download to a temp dir and rename on success.
This prevents ghost packages ending up in your pub cache if a
download fails. Also added some more output during installation so
you can see what's happening.

BUG=

Review URL: https://codereview.chromium.org//11151026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13666 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-15 20:59:56 +00:00
rnystrom@google.com 182ae3e26c Update pub to use new import syntax.
Review URL: https://codereview.chromium.org//11093012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13391 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 01:25:43 +00:00
rnystrom@google.com eb33df709b Include stderr on git failure.
Also moves the git stuff out of io into its own library.

Review URL: https://codereview.chromium.org//11066066

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13388 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 00:56:57 +00:00
nweiz@google.com 85b348a987 Allow circular dependencies on the root source in Pub.
BUG=5300

Review URL: https://codereview.chromium.org//10949026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12817 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 22:55:42 +00:00
nweiz@google.com bb468499d4 Don't extract the name of a package from its description.
Instead, the pubspec is considered to be the canonical name. This has the side
effect of requiring that all dependencies have a pubspec with a name field.

BUG=5205

Review URL: https://chromiumcodereview.appspot.com//10938003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12517 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 22:09:37 +00:00
bak@google.com 26a215b25a Changed interfaces to abstract classes in utils.
Review URL: https://chromiumcodereview.appspot.com//10915231

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12263 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 13:30:26 +00:00
nweiz@google.com af2d533d41 Fix some compilation errors and warnings in Pub.
Review URL: https://chromiumcodereview.appspot.com//10880055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11355 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 23:57:42 +00:00
rnystrom@google.com 17a941e040 Update pub to new getter syntax.
Review URL: https://chromiumcodereview.appspot.com//10869033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11270 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 22:41:47 +00:00
ager@google.com 722c1a3ce6 Deprecate Math object in corelib in favor of dart:math library.
Review URL: https://chromiumcodereview.appspot.com//10829459

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11155 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 14:33:01 +00:00
nweiz@google.com 8a0aabe483 Allow pub install and pub update to update dependers.
If the pubspec has a new dependency which causes an incompatibility with the
locked packages' version constraints, `pub install` will now unlock packages
one by one until a compatible version graph can be found.

`pub update <package>` will now always update the given package to its latest
version, even if that requires updating locked packages that depend on it
transitively. If no amount of updating will make the latest version valid, an
exception will be thrown.

This was originally submitted as r10779

Review URL: https://chromiumcodereview.appspot.com//10837274

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11119 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 00:25:45 +00:00
regis@google.com d9b0276a4c Require two type arguments for map literals (issue 4522).
Spec has been changed back.
VM temporarily accepts a single type argument and emits a warning.
Update tests, dart2js source, dartdoc, etc...
Disable failing co19 tests (issue 175 filed).
Review URL: https://chromiumcodereview.appspot.com//10854191

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10861 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 20:44:32 +00:00
nweiz@google.com 30dc5566d8 Reverting 10779
Review URL: https://chromiumcodereview.appspot.com//10825375

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10781 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 23:32:43 +00:00
nweiz@google.com 8b8f1af9dc Allow pub install and pub update to update dependers.
If the pubspec has a new dependency which causes an incompatibility with the
locked packages' version constraints, `pub install` will now unlock packages
one by one until a compatible version graph can be found.

`pub update <package>` will now always update the given package to its latest
version, even if that requires updating locked packages that depend on it
transitively. If no amount of updating will make the latest version valid, an
exception will be thrown.

Review URL: https://chromiumcodereview.appspot.com//10854152

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10779 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 23:24:24 +00:00
nweiz@google.com 7b72bd1b8d Use a lockfile to persist Pub's installed version constellation.
This fixes a race condition in r9767 caused by issue 4155.

Review URL: https://chromiumcodereview.appspot.com//10790079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9824 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 19:36:22 +00:00
nweiz@google.com 20b75854d1 Reverting 9767.
Review URL: https://chromiumcodereview.appspot.com//10803042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9768 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 19:44:30 +00:00
nweiz@google.com 915c6be38b Use a lockfile to persist Pub's installed version constellation.
Review URL: https://chromiumcodereview.appspot.com//10796021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9767 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 19:37:09 +00:00
nweiz@google.com a6466ffe20 Make VersionSolver actually return PackageIds.
Review URL: https://chromiumcodereview.appspot.com//10701146

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9574 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 22:57:44 +00:00
nweiz@google.com 8f53bf75f9 Make VersionSolver source- and description-aware.
Review URL: https://chromiumcodereview.appspot.com//10690032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9260 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 19:36:05 +00:00
nweiz@google.com 9d0be9e342 Don't try to look up the root package in the default source.
Review URL: https://chromiumcodereview.appspot.com//10674007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9184 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 18:14:59 +00:00
rnystrom@google.com bfe7935124 First pass at version constraint solver.
It does:
- Walk dependency graphs.
- Unify shared constraints.
- Go through Source to get dependency and version information.
- Handle the fact that everything is async.
- Find best versions that match all constraints.
- Error out if it can't find a match or gets stuck in a loop.
- Have an OK amount of tests.

It does not:
- Handle dependencies from different sources.
- Integrate with the rest of pub.
- Implement an actual "pub update" command.
- Do very much to minimize server traffic.
  (Though it does cache pubspecs it has requested.)

Review URL: https://chromiumcodereview.appspot.com//10540151

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8985 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 15:50:57 +00:00