Commit Graph

35 Commits

Author SHA1 Message Date
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 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
nweiz@google.com f181fdc8a8 Add a Pub validator for READMEs that are invalid utf-8.
BUG=7045

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17948 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 22:39:53 +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 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 5704507534 Show better error messages in network failures.
We had decent messages for a couple of failure modes. This tries
to catch some more.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14543 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-05 20:42:39 +00:00
rnystrom@google.com 4c04a099d5 Apply patch from other client.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13984 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 20:25:58 +00:00
floitsch@google.com 9074fd0178 Make hashCode a getter and not a method.
Review URL: https://codereview.chromium.org//11191078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13866 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-22 12:41:04 +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
lrn@google.com 37197c2553 Stop using the Hashable interface.
All objects have a hashCode method, so there is no need for a Hashable
interface.
The interface itself is retained for at least two weeks, to give time for
code to remove uses of it.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12955 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 13:07:54 +00:00
lrn@google.com a1faa6f135 Change IllegalArgumentException to ArgumentError.
Review URL: https://codereview.chromium.org//10989013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12841 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 12:27:52 +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
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
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 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 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
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
rnystrom@google.com 9636d43bf4 "pubspec" -> "pubspec.yaml".
Review URL: https://chromiumcodereview.appspot.com//10544041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8405 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 18:32:16 +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
nweiz@google.com a8038715b0 Add a Pub source that checks packages out from Git.
This was submitted as r7623, but was then reverted due to test failures. The new
version doesn't depend on Git's output.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7629 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 21:36:55 +00:00
nweiz@google.com cd3261497d Reverting 7623
TBR

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7626 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 20:29:38 +00:00
nweiz@google.com 5dfb6baea5 Add a Pub source that checks packages out from Git.
Review URL: https://chromiumcodereview.appspot.com//10386021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7623 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 19:53:49 +00:00
nweiz@google.com 3085912d01 Add support for pub install.
This CL does several things:

* Adds explicit infrastructure for package sources.
* Adds the Dart SDK as such a source.
* Adds an explicit class for managing the packages/ directory (AppCache, as
  opposed to SystemCache).
* Adds an "install" command that installs to packages/, backed up by the system
  cache.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7398 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 19:58:32 +00:00
rnystrom@google.com f7a1480c4e Fix a couple of minor issues and try to resolve #2740.
Review URL: https://chromiumcodereview.appspot.com//10230016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7087 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 16:00:13 +00:00
rnystrom@google.com 36371653f4 Refactor command code and add support for --help and --version.
Review URL: https://chromiumcodereview.appspot.com//10214006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6985 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 00:45:24 +00:00
nweiz@google.com 35b7a697bb Use YAML as the format for the pubspec file.
Review URL: https://chromiumcodereview.appspot.com//10174029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6982 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 23:09:32 +00:00
rnystrom@google.com 8c913b10fc First pass at "pub update" implementation.
This will create a "packages" directory next to the current
package's entrypoint and populate it with symlinks to packages
in the pub package cache. Transitive dependencies are handled.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6979 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 22:18:15 +00:00
rnystrom@google.com 9c5e4a2ec2 Start implementing pub object model. Rudimentary package cache class, and a simple pub command to list its contents.
Review URL: https://chromiumcodereview.appspot.com//10091014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6779 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-20 00:00:05 +00:00