Commit graph

320 commits

Author SHA1 Message Date
bors aa8986ffc4 auto merge of #87 : alexcrichton/cargo/toml-warnings, r=wycats
Closes #27
2014-06-30 20:00:09 +00:00
bors e8912bfc66 auto merge of #83 : huonw/cargo/manifest-search, r=alexcrichton,alexcrichton 2014-06-30 01:15:09 +00:00
Huon Wilson c0865e85e3 Check for the existence of Cargo.toml when reading packages.
Fixes #82.
2014-06-30 10:42:08 +10:00
Huon Wilson 97d1d358af Generalise find_project to not always search parents.
Also, add a helper around `find_project` that returns `dir/file` rather
than just `dir`.
2014-06-29 16:46:24 +10:00
bors 52f050a114 auto merge of #90 : brson/cargo/fix, r=alexcrichton
This reverts commit 09e52c88d8, reversing
changes made to bc31d2a23b.
2014-06-29 00:15:06 +00:00
Brian Anderson e9eac3d119 Revert "Merge pull request #89 from rust-lang/revert-88-fix"
This reverts commit 09e52c88d8, reversing
changes made to bc31d2a23b.
2014-06-28 17:11:13 -07:00
Brian Anderson d424e0f2c9 Merge pull request #89 from rust-lang/revert-88-fix
Revert "Basic URL canonicalization. Fixes #84"
2014-06-28 17:09:35 -07:00
Brian Anderson dc8ef72939 Revert "Basic URL canonicalization. Fixes #84" 2014-06-28 17:09:22 -07:00
Brian Anderson 3254717508 Merge pull request #88 from brson/fix
Basic URL canonicalization. Fixes #84
2014-06-28 17:08:02 -07:00
Brian Anderson ae2a42318c Future proof URL canonicalization tests 2014-06-28 17:07:49 -07:00
Brian Anderson 91d2bbf576 Add tests for URL canonicalization and canonicalize .git extensions 2014-06-28 16:44:56 -07:00
Brian Anderson 7c049f32a4 Add a hack to make github urls case-insensitive. Fixes #84 2014-06-28 16:19:55 -07:00
Brian Anderson 12d1a512ea Account for trailing / in URLs when determining on-disk location. Fixes #84.
No tests because there's no preexisting network tests.
2014-06-28 15:44:11 -07:00
Alex Crichton a2aa2bf938 Warn about unused TOML keys
Closes #27
2014-06-28 15:18:44 -07:00
bors 9288b6e618 auto merge of #75 : samebchase/cargo/add-help-for-test, r=alexcrichton 2014-06-28 19:43:12 +00:00
bors 5f653e9cee auto merge of #81 : alexcrichton/cargo/fix-windows, r=wycats 2014-06-28 19:34:40 +00:00
Alex Crichton 0ccb2fa2e2 Use a custom rm_rf to paper over windows git funkiness 2014-06-28 12:28:36 -07:00
bors de4a4bfdec auto merge of #78 : huonw/cargo/minor-de-.unwrapping, r=alexcrichton
I don't think any of the `.unwrap`s I touched can actually be hit since they all seem to have checks earlier, but reducing the number of calls is always nice and makes the code easier to verify.

I'm not sure if the `,` -> `:` commit is actually correct, I was just working from the surrounding context.
2014-06-27 21:12:07 +00:00
Huon Wilson 3543133414 Remove/refactor some .unwraps.
Many of these had some precondition being changed that guaranteed they'd
never happen, but could be expressed to just avoid the `.unwrap`
entirely (easier to check).

Other `Option` unwraps were changed to have a mildly more informative
error message by using `.expect`.
2014-06-27 21:55:11 +10:00
Huon Wilson 2f0ac4a702 s/,/:/ in what appears to be JSON. 2014-06-27 21:54:09 +10:00
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