Commit graph

1845 commits

Author SHA1 Message Date
Alex Crichton 081065d369 Fix a relative rustc spec to .cargo/config
The paths were mistakenly relative to .cargo/config, not the directory
containing .cargo/config
2015-05-19 21:43:41 -07:00
bors a1778efa74 Auto merge of #1629 - alexcrichton:env-rustc, r=alexcrichton
These commits add two vectors through which the compiler run can be configured:

* A `RUSTC` environment variable
* A `build.rustc` configuration variable in a `.cargo/config` file
2015-05-19 04:13:45 +00:00
Alex Crichton 8a8ea1e89e Add rustc/rustdoc config keys to Cargo config
In addition to global RUSTC/RUSTDOC env vars, this commit recognizes
`build.rustc` and `build.rustdoc` as configuration keys for Cargo to instruct
what tools should be used instead of the default.

Closes #967
2015-05-18 21:11:51 -07:00
bors 6962728bb1 Auto merge of #1625 - alexcrichton:ignore-dotfile, r=brson
Whenever Cargo infers various targets for a project it currently picks up all
files in associated folders, but dotfiles are a common example of files which
editors generate which Cargo should not pick up, so this commit ignores all
dotfiles in the folders that it is looking at.

Closes #1615
2015-05-19 01:03:03 +00:00
bors 9be0f261a8 Auto merge of #1632 - hansjorg:master, r=alexcrichton
Check for existence of file in dl_path before fetching with curl.
If file exists, compare hash with expected.

Also wrap tarfile.open() in contextlib.closing() to support older
python versions (<= 2.6).

This fixes part of #1525.
2015-05-19 00:50:07 +00:00
Hans Jørgen Hoel 79cb5b9106 Make dl-snapshot.py avoid dl'ing existing files
Check for existence of file in dl_path before fetching with curl.
If file exists, compare hash with expected.

Also wrap tarfile.open() in contextlib.closing() to support older
python versions (<= 2.6).

This fixes part of #1525.
2015-05-19 01:27:29 +02:00
Alex Crichton 2fe0bf83bf Remove borrowed pointer in Config
Not having a lifetime parameter on the ubiquitous Config structure allows a
great deal of other lifetime annotations to be removed and should make dealing
with storage of Config in a structure much easier (only one lifetime to deal
with, not two).
2015-05-18 15:33:04 -07:00
Alex Crichton 20ce682e85 Recognize RUSTC/RUSTDOC environment variables 2015-05-18 15:01:35 -07:00
bors 3721b634d5 Auto merge of #1628 - alexcrichton:update-deps, r=alexcrichton
Opt in to nightly features for a few, and update others to get bitrig support
2015-05-18 21:49:39 +00:00
Alex Crichton 54d1ac3966 Update cargo deps
Opt in to nightly features for a few, and update others to get bitrig support
2015-05-18 14:47:33 -07:00
bors 3d926ee57b Auto merge of #1627 - brson:version, r=alexcrichton
So we have a unique version number to pair with Rust 1.1.
2015-05-18 20:07:47 +00:00
Brian Anderson 49ac979568 Bump version to 0.3 2015-05-18 11:21:57 -07:00
bors e2372a88b3 Auto merge of #1619 - Eljay:fix-doc-open, r=alexcrichton
Fixes #1595.
2015-05-18 15:42:06 +00:00
Alex Crichton 1727409e6d Don't auto-build dotfiles in inferred folders
Whenever Cargo infers various targets for a project it currently picks up all
files in associated folders, but dotfiles are a common example of files which
editors generate which Cargo should not pick up, so this commit ignores all
dotfiles in the folders that it is looking at.

Closes #1615
2015-05-18 08:32:35 -07:00
Lee Jeffery ccfcc9008c Reuse existing crate_name method instead. 2015-05-17 21:57:10 +01:00
bors ac61996f8d Auto merge of #1616 - sbeckeriv:master, r=alexcrichton
This resolves #1379
2015-05-17 20:30:03 +00:00
bors c60f58568d Auto merge of #1620 - Eljay:empty-package-name, r=alexcrichton
Some simple validation for package/target names. Currently failure for these cases happens later in rustc (e.g. "crate name must not be empty") or at the os level (e.g. "Is a directory" error when package name is empty on linux). Better to handle this earlier so it's consistent across platforms.

Still could do with a lot of validation for invalid characters etc. though.
2015-05-17 20:06:53 +00:00
Stephen Becker IV 372e9d60b9 Fix whitespace
Now matches test output.
2015-05-17 09:32:53 -07:00
Stephen Becker IV d726c576b0 Update text per comment in pull request.
Better error message with details around lib and bin.
2015-05-17 09:01:50 -07:00
Lee Jeffery 10ac930fdd Added some checks for empty package and target names. 2015-05-17 13:03:23 +01:00
Lee Jeffery ec0ac6f9e6 Fix doc --open crate name. 2015-05-17 09:21:50 +01:00
Stephen Becker IV 649625d707 Update error message with more details.
This resolves #1379.
2015-05-16 12:39:48 -07:00
bors a48358155c Auto merge of #1611 - IvanUkhov:missing-bracket, r=alexcrichton 2015-05-14 20:34:00 +00:00
Ivan Ukhov 3502167ec4 Add a missing square bracket 2015-05-14 15:32:31 -04:00
bors d814fcbf8e Auto merge of #1604 - alexcrichton:update, r=alexcrichton
There was a lifetime parameter regression in git2-rs which prevented Cargo from
building on nightly
2015-05-13 04:24:28 +00:00
Alex Crichton d46aec562d Update Cargo to rust master
There was a lifetime parameter regression in git2-rs which prevented Cargo from
building on nightly
2015-05-12 21:22:14 -07:00
bors a078e01ffa Auto merge of #1598 - critiqjo:bash-complete, r=alexcrichton
Fixes #1548
@gentoo90 is it possible to handle long-opts such as `--url=` nicely?
@jeffs please test this out in OS X default bash version...
2015-05-11 18:01:02 +00:00
critiqjo e1dcd83148 Bash completion: bash 3 compatibility 2015-05-10 16:37:50 +05:30
bors 0d75eb6c8a Auto merge of #1568 - sondrele:rustc-subcommand, r=alexcrichton
## Work in progress
I have followed issue #595 for a while now. I hope that this PR can solve it, after it's done of course.

@alexcrichton: on IRC the other day, you suggested adding a `Vec<String>` to the `CompileOptions`. I have done this, but wasn't sure what the best way to identify the correct `Target` would be, so currently everything gets compiled with the additional arguments. 
I considered adding a `Target` structure to the `CompileOptions` as well, and then in `cargo_rustc::build_base_args` only append the arguments if the `Target` matches. What do you think about this? Is there an easier way of figuring out the correct `Target`?

r? @alexcrichton
2015-05-07 19:18:10 +00:00
bors 1ec2257b67 Auto merge of #1590 - alexcrichton:issue-1589, r=brson
Knowing the target architecture for calculating the filename is needed when
calculating the name of a dynamic library, and previously this was only taken
into account when a target was a plugin. Targets can, however, request that they
are built as a dynamic library which also needs to be taken into account.

Closes #1589
2015-05-07 18:39:48 +00:00
Alex Crichton c54c6a9df4 Add a Kind argument to target_filenames
Knowing the target architecture for calculating the filename is needed when
calculating the name of a dynamic library, and previously this was only taken
into account when a target was a plugin. Targets can, however, request that they
are built as a dynamic library which also needs to be taken into account.

Closes #1589
2015-05-06 19:29:05 -07:00
bors ece2a9235f Auto merge of #1586 - gentoo90:bash-comp, r=wycats
Fix inability to complete more than one option of a command.
Add missing options.
2015-05-06 16:54:57 +00:00
gentoo90 174aa2e61d Bash-completion minor improvements
Fix inability to complete more than one option of a command.
Add missing options.
2015-05-06 15:37:35 +03:00
Sondre Lefsaker 2cd3c86276 Suggest adding flags to filter the package in the error message 2015-05-06 12:08:43 +02:00
Sondre Lefsaker 98c0e2d83d Cleanup:
- Dereference arguments before matching
- use square brackets for vec! macro
2015-05-06 10:34:37 +02:00
Sondre Lefsaker dc33bfaa82 Update subcommand documentation 2015-05-06 10:29:59 +02:00
bors 30bc735921 Auto merge of #1585 - tshepang:typos, r=alexcrichton 2015-05-06 00:11:54 +00:00
Tshepang Lekhonkhobe 74076d2a04 fix typos caught by codespell 2015-05-06 02:05:41 +02:00
bors aa8ee2dfcc Auto merge of #1584 - alexcrichton:issue-797, r=brson
Closes #797
Closes #1575 

This is a reopening of #1170 but I see the two closed issues as important enough that this needs to land in some form or another, and I'm more comfortable with always taking into account untracked files than only if there isn't a commit yet.
2015-05-05 23:28:56 +00:00
Alex Crichton a8e9ce22c1 Scan untracked files in git for packaging/deps
Closes #797
Closes #1575
2015-05-05 15:58:00 -07:00
bors 9cd0d3570a Auto merge of #1577 - alexcrichton:issue-1567, r=brson
Previously if a package had been activated without the default feature and then
it was attempted to be reactivated with the default feature, resolution wouldn't
continue and actually activate the default feature. This means that the
fingerprint on the other end of compilation would be slightly different because
the set of activated features would be slightly different, causing spurious
recompiles.

Closes #1567
2015-05-05 17:42:08 +00:00
bors 83fd8aab38 Auto merge of #1576 - takkanm:add_search_to_help, r=alexcrichton
There was no "Search" to help message.
2015-05-05 16:50:19 +00:00
Alex Crichton 40d1c10a83 Check default features when skipping resolution of a package
Previously if a package had been activated without the default feature and then
it was attempted to be reactivated with the default feature, resolution wouldn't
continue and actually activate the default feature. This means that the
fingerprint on the other end of compilation would be slightly different because
the set of activated features would be slightly different, causing spurious
recompiles.

Closes #1567
2015-05-04 23:17:17 -07:00
Mitsutaka Mimura ae783c6c69 change search help to better message 2015-05-05 11:13:04 +09:00
Mitsutaka Mimura 4ebe44aef5 add search to help 2015-05-05 10:59:05 +09:00
bors 7f810ba5ef Auto merge of #1574 - alexcrichton:rustup, r=alexcrichton 2015-05-03 19:43:40 +00:00
Alex Crichton 9c445b9294 Update to rust master, picking up metadata mtime changes
This commit adds a new `MTime` structure specifically for dealing with
modification times across platforms.
2015-05-03 12:41:04 -07:00
Sondre Lefsaker c867813646 Add more tests:
- `build_with_args_to_one_of_multiple_binaries`, verify that only one bin gets built
- `fails_with_args_to_all_binaries`
- `build_with_args_to_one_of_multiple_tests`, same behavious as for the binaries
- `build_foo_with_bar_dependency`, verify that bar dependency gets built and only foo gets compiled with args
- `build_only_bar_dependency`, build the bar package, that foo depends, on with the extra args
2015-05-03 01:16:20 +02:00
Sondre Lefsaker bd4d15fe1e Cleanup tests - favor more explicit expected result instead of using helper functions 2015-05-03 00:49:58 +02:00
Sondre Lefsaker d8cd6f060b Modify test to build main like before, but lib also gets built as a dependency.
- The test verifies that the trailing arguments only gets passed to the binary being built
2015-05-02 18:18:05 +02:00