Commit Graph

50 Commits

Author SHA1 Message Date
rnystrom@google.com b12e27a4d2 Get rid of join() and encapsulate File and Directory in io.dart.
Review URL: https://codereview.chromium.org//12253054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18551 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 01:13:07 +00:00
rnystrom@google.com ba326cd770 Get rid of old redundant methods in io.dart.
Now that we have pkg/path, we can ditch the old methods in io.dart
that do the same thing.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18500 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 01:14:31 +00:00
rnystrom@google.com ec020bbd99 Handle circular dependencies on the root package when checking SDK constraints.
BUG=dartbug.com/8364

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18198 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 00:40:09 +00:00
rnystrom@google.com b3606c9047 Tweak SDK constraint checking a bit.
Review URL: https://codereview.chromium.org//12171002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18020 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 00:47:26 +00:00
rnystrom@google.com b6d5dc7f5a Make a bunch of stuff in pub synchronous.
Review URL: https://codereview.chromium.org//12079112

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18019 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 00:30:16 +00:00
rnystrom@google.com 4a9cc0f619 Validate packages against their SDK constraints.
After running pub install or update, it will look at all of the
selected packages and see if their SDK constraints match the
current SDK. If not, it will show a (hopefully) helpful error
message.
BUG=dartbug.com/6285

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18014 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 23:45:26 +00:00
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
rnystrom@google.com 344249b02f Get rid of unneeded Future.immediate() calls.
Future.then() will now implicitly wrap the callback result in a
future if it isn't one, so this manual wrapping can be removed.

Also take advantage of the fact that Future.immediate() is always
async now and remove some workarounds.

Finally, noticed there were two copies of the git-related code
floating around so killed the old one.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17519 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 01:13:36 +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
nweiz@google.com 5168d9bafd Add a validator for dependency version constraints.
BUG=7045

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16415 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 01:59:58 +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 ff428417ed Workaround #6986.
This avoids trying to read a non-existent lockfile. On some
non-English locales, this fails when trying to parse the error
message coming from Windows.
BUG=6986

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15992 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 19:01:47 +00:00
nweiz@google.com f813520a0a Add Bob's path library to pub.
BUG=7215

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15881 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-08 03:47:03 +00:00
rnystrom@google.com 88bb817a82 Finish integrating logging.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15877 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-08 03:13:13 +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
nweiz@google.com 0e9b2ef0bd Add validation infrastructure for "pub lish".
This also adds a simple validator.

BUG=7045

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15765 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 00:25:41 +00:00
rnystrom@google.com 10c9d938ab Place "packages" directories inside "tool".
Review URL: https://codereview.chromium.org//11362233

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14868 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 22:06:35 +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
nweiz@google.com 5096506fe0 Add packages/ directories for dart files in web/.
BUG=5196

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12587 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 18:54:01 +00:00
nweiz@google.com 9f569161f7 Delete the packages/ directory before installing new packages to it.
BUG=5123

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12585 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 18:16:58 +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
rnystrom@google.com 3317817025 Support both new and old style package layouts.
Update the tests to all use the new layout.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12224 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 21:55:47 +00:00
rnystrom@google.com 361e992008 Hide self-referential symlinks behind a flag in pub.
Review URL: https://chromiumcodereview.appspot.com//10907036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11725 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 21:54:49 +00:00
nweiz@google.com ac0927b2eb Improve the error message for pub install without a name key in the pubspec.
BUG=4806

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11643 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 18:57:33 +00:00
nweiz@google.com cb45c460f7 Create packages directories in test/ and bin/ as well as at the top level.
This is necessary to run Dart files in these directories.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11549 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 20:57:03 +00:00
nweiz@google.com 89b1f5ec12 Support removing dead packages with pub install.
Review URL: https://chromiumcodereview.appspot.com//10867070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11356 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-25 00:18:48 +00:00
nweiz@google.com e74b871e92 Support self-referential package: imports with Pub.
Review URL: https://chromiumcodereview.appspot.com//10874051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11334 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 18:48:00 +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
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
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 ae7c34c537 Make "pub update PACKAGE" update a specific package.
Review URL: https://chromiumcodereview.appspot.com//10809058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9899 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 18:23:18 +00:00
nweiz@google.com d4ef73e116 Make "pub update" update all packages.
Review URL: https://chromiumcodereview.appspot.com//10809057

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9825 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 20:13:33 +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 2c2583e304 Hook in the version solver to pub install.
Review URL: https://chromiumcodereview.appspot.com//10704172

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9604 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 18:47:31 +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 5a6998d14e Add a Pub source for pub.dartlang.org.
This fixes a race condition in commit 9094.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9132 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 20:01:30 +00:00
nweiz@google.com d13116a711 Reverting 9094
Review URL: https://chromiumcodereview.appspot.com//10666042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9097 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 23:54:43 +00:00
nweiz@google.com 7af3fdfdfa Add a Pub source for pub.dartlang.org.
This fixes a couple typos in commit 9090.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9094 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 23:45:21 +00:00
nweiz@google.com 3a5c7b9dcc Reverting 9090
Review URL: https://chromiumcodereview.appspot.com//10659019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9093 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 23:23:39 +00:00
nweiz@google.com fffc9979fe Add a Pub source for pub.dartlang.org.
Review URL: https://chromiumcodereview.appspot.com//10628016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9090 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 22:52:32 +00:00
rnystrom@google.com e4ce65ae8f Get rid of #source in pub.
Review URL: https://chromiumcodereview.appspot.com//10442023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7967 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 23:29:18 +00:00
rnystrom@google.com 20c48b237f Get codebase ready for actually supporting versioning.
Review URL: https://chromiumcodereview.appspot.com//10399076

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7776 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 23:14:18 +00:00