Commit graph

250 commits

Author SHA1 Message Date
Samuel Chase b221be323d Remove superfluous newline 2014-06-27 16:17:34 +05:30
Samuel Chase 0c787a834d Add command line help text for new subcommand 'cargo test' 2014-06-27 16:13:55 +05:30
bors c993a545dc auto merge of #72 : Arcterus/cargo/master, r=alexcrichton
Now Cargo should give a normal error message rather than a task failure when encountering an SSH URL as a dependency.
2014-06-27 04:45:52 +00:00
Arcterus 856f37091c Error out on ssh dependencies (fixes #55) 2014-06-26 21:41:06 -07:00
bors c919f2f646 auto merge of #70 : alexcrichton/cargo/buildbot, r=wycats
* The installation script was modified to recognize when its running on windows,
  as well as tweaking how it downloads and installs snapshots. The goal here was
  to make the script runnable on buildbot for mac/linux/windows with 32/64 bit
  options on mac/linux.

* The installation script now install rustc to `rustc/bin` in the local
  directory to have parallel builds on buildbot.

* The tests now store all their temporary state locally in the build directory
  to enable parallel builds on buildbot.

* A shell test is ignored which assumed the presence of a TTY output.
2014-06-27 03:36:24 +00:00
Alex Crichton ad19a31d9b Prepare for buildbot automation
* The installation script was modified to recognize when its running on windows,
  as well as tweaking how it downloads and installs snapshots. The goal here was
  to make the script runnable on buildbot for mac/linux/windows with 32/64 bit
  options on mac/linux.

* The installation script now install rustc to `rustc/bin` in the local
  directory to have parallel builds on buildbot.

* The tests now store all their temporary state locally in the build directory
  to enable parallel builds on buildbot.

* A shell test is ignored which assumed the presence of a TTY output.
2014-06-26 20:25:30 -07:00
Yehuda Katz + Carl Lerche a7e560fcfa Fix temporary error message to be clearer 2014-06-26 17:10:00 -07:00
Yehuda Katz + Carl Lerche 2c4a944c18 100 chars 2014-06-26 16:51:37 -07:00
Tim Carey-Smith 13eb123213 Add cargo test 2014-06-26 16:47:27 -07:00
Yehuda Katz 920b8b3421 Merge pull request #64 from alexcrichton/no-recompile-nested-deps
Don't recompile nested deps too frequently
2014-06-25 16:02:24 -07:00
Alex Crichton 8d5acdfc67 Don't recompile nested deps too frequently
When compiling a package with a nested dependency, any modification to the outer
package would trigger a recompilation of the inner package. This commit alters
the fingerprint() method to take a PackageId to query about the location of a
package and only lookup the files relevant to that package.

The dependency structure of a PathSource is now everything rooted at the
original Cargo.toml minus all subdirectories which contain a Cargo.toml
2014-06-25 15:21:43 -07:00
Yehuda Katz 53a4b9856c Merge pull request #56 from alexcrichton/fix-windows-tests
Fix all tests on windows
2014-06-25 11:56:40 -07:00
Alex Crichton c3ec9999cb Ignore \r in output matching
Windows occasionally has \r\n while everywhere else has \n. Instead of worrying
about the difference, just replace all instances of \r with nothing and rely on
matching against \n.
2014-06-25 11:15:04 -07:00
Alex Crichton 80a81334f6 Fix lots of windows tests
* Add a convenience method bin() for generating the name of a binary. On windows
  this remembers to append `.exe`.

* Stop executing relative paths to binaries and relying on PATH. This is
  suffering from rust-lang/rust#15149 and failing to spawn processes on windows.
  Additionally, this allows the tests to work with a pre-installed cargo becuase
  the freshly built executables are precisely specified.

* A new function, escape_path(), was added for tests. When generated source
  files with paths, this function needs to be called to properly escape the
  \-character that appears in windows path names. Without this function we would
  be generating invalid TOML and rust.
2014-06-25 11:15:04 -07:00
Alex Crichton de5b7136cd Switch the process builder to starting from ToCStr
This is the same as the libstd Command builder, and will soon be used in the
tests for spawning processes on windows.
2014-06-25 11:12:56 -07:00
Alex Crichton 06d19011db Fix rm_rf on windows
Apparently git checkouts have objects in the database with permissions 444 which
need to be changed to something with a write permission before removal.
2014-06-25 11:12:56 -07:00
Alex Crichton 200398ef8f Disable terminal tests on windows
The windows terminal does not use terminfo and is much different, so these tests
will fail on windows or actually write to the console.
2014-06-25 11:12:56 -07:00
Alex Crichton 1a7a48844c Move from all-URL to Path/URL enum
On windows a path cannot be represented as a file:// URL because of the
backslashes and colons in the file name. This causes all of the tests which rely
on git to fail on windows. This commit changes the representation of the
location of a package to be an enum, Location, with two variants: Remote and
Local.

When parsing Cargo.toml, all locations which begin with the string "file:" have
that prefix stripped and are then interpreted as Local packages. Everything else
is parsed as a URL and used as a Remote package.
2014-06-25 11:12:56 -07:00
Alex Crichton df3b3c0b34 Fix the toml-rs build location 2014-06-25 11:09:39 -07:00
Alex Crichton 1cd400c1cd Use correct path separator on windows 2014-06-25 11:09:39 -07:00
Alex Crichton c1d71eb9f0 Merge pull request #63 from dtrebbien/patch-update-toml-rs
Update libs/toml-rs
2014-06-25 13:40:06 -04:00
Daniel Trebbien 459b9c6d15 Update libs/toml-rs
Include alexcrichton/toml-rs@66c8348
2014-06-25 13:10:21 -04:00
Alex Crichton c7770ad448 Merge pull request #59 from mcpherrinm/nobloat
Delete tests binary, which doesn't belong
2014-06-25 09:32:09 -04:00
Alex Crichton ff4c18963a Merge pull request #53 from huonw/version-error
Handle misformatted versions with a nicer error message.
2014-06-25 09:16:43 -04:00
Huon Wilson 9514dafd0e Handle misformatted versions with a nicer error message. 2014-06-25 18:05:51 +10:00
Carl Lerche 7145739f74 Rename make distclean -> clean-all 2014-06-24 15:50:15 -07:00
Yehuda Katz c08f8f3026 Add support for branch/tag/rev options 2014-06-24 15:23:14 -07:00
Yehuda Katz fe6240146d Update README.md 2014-06-24 13:37:28 -07:00
Yehuda Katz fa79f337ad Merge pull request #49 from o11c/install-paths
Correct installation to follow standards
2014-06-24 13:34:40 -07:00
Yehuda Katz c9489db75e Merge pull request #48 from gilles-leblanc/issue40
Adds .vagrant files to .gitignore
2014-06-24 13:29:56 -07:00
Gilles Leblanc 381bbf56a7 Removes vagrant files from project
Fixes #40
2014-06-24 16:12:33 -04:00
Brian Anderson da1c17e744 Merge pull request #50 from alexcrichton/license
Add the standard Rust Apache/MIT license
2014-06-24 12:50:19 -07:00
Alex Crichton c6fc2f587d Add the standard Rust Apache/MIT license
This copies the same Apache and MIT license files from the rust-lang/rust
repository to the cargo repository. It notable retains the same copyright line
as the rust repository:

    Copyright (c) 2014 The Rust Project Developers

The COPYRIGHT file from the rust repository was not copied over as it looked
like it mainly contained information about third party dependencies, which cargo
does not have yet.

The wording at the end of the rust repository's README.md was also copied over
to cargo's README.md with tweaks to not mention COPYRIGHT and third-party BSD
licenses.

Closes #34
2014-06-24 12:26:13 -07:00
Ben Longbons fee7a47aba Correct installation to follow standards 2014-06-24 11:10:27 -07:00
Alex Crichton eb7a16376f Clarify make install exists as a target
Closes #39
2014-06-24 06:44:47 -07:00
Yehuda Katz bbd57905ca Update README.md 2014-06-23 23:09:03 -07:00
Yehuda Katz d9a6af02a0 Merge pull request #31 from alexcrichton/hotfix-windows2
Work around \-characters on Windows for now
2014-06-23 22:49:11 -07:00
Alex Crichton 352efa73b5 Work around \-characters on Windows for now 2014-06-23 22:42:10 -07:00
Yehuda Katz eb6b0d6281 Rename cargo-compile to cargo-build 2014-06-23 19:09:12 -07:00
Yehuda Katz 5919fa0dfc Only force update git if -u is passed
This will become moot once we have a lockfile, because we'll be able to
check whether the last rev we used is still available and skip fetching.
2014-06-23 18:54:13 -07:00
Yehuda Katz 860ca08ad2 Allow absent git version 2014-06-23 17:38:50 -07:00
Carl Lerche de6944798c GitSource delegates to PathSource for path ops 2014-06-23 17:03:39 -07:00
Yehuda Katz b4e8630270 Fix the README 2014-06-23 17:02:22 -07:00
Yehuda Katz 86b2a2a432 Support [package] or [project]
The plan is to free up [project] for simpler config plus output flags
like -O that don't make sense in packages.
2014-06-23 16:57:27 -07:00
Yehuda Katz 6ac9d779ba Merge pull request #29 from cmr/make-install
Makefile: support install, makes packaging easier
2014-06-23 16:34:44 -07:00
Carl Lerche 3948538018 Specify the SourceId that the path source represents 2014-06-23 16:16:22 -07:00
Corey Richardson e6de26491f Makefile: support install, makes packaging easier 2014-06-23 15:38:56 -07:00
Yehuda Katz dd9d81b6d6 Merge pull request #28 from alexcrichton/new-toml
Move from rust-toml to toml-rs
2014-06-23 14:13:59 -07:00
Alex Crichton d4265ef2a0 Move from rust-toml to toml-rs
This commit should greatly improve all error messages related to decoding
Cargo.toml.
2014-06-23 11:38:53 -07:00
Alex Crichton 919ca13abd Fix long lines 2014-06-23 10:30:25 -07:00