8991 Commits

Author SHA1 Message Date
Takayuki Nakata
a28d9a1e2a Add test for cargo pkgid 2019-12-29 20:42:50 +09:00
Eric Huss
30cc7cebfc Check for a source defined multiple times. 2019-12-28 12:51:56 -08:00
bors
feac578aab Auto merge of #7742 - jplatte:master, r=ehuss
Add a note to the error message for using --feature / --no-default-features in a virtual workspace

fixes #7727
2019-12-28 19:08:59 +00:00
bors
5336fba8e3 Auto merge of #7749 - iu0zjp2:patch-1, r=ehuss
Fix debug message.

The [path] field of [Fingerprint] contains the "Hash of the path to the base source file".

repro:
```
$ cargo new a
$ cd a
$ echo 'cfg-if="0"' >> Cargo.toml
$ CARGO_HOME=cargo1 cargo build
$ mv cargo1 cargo2
$ CARGO_LOG=cargo::core::compiler::fingerprint=trace CARGO_HOME=cargo2 cargo build
[...]
[... INFO  cargo::core::compiler::fingerprint]     err: path to the compiler has changed
```
2019-12-28 18:48:13 +00:00
iu0zjp2
1b70e573a8
Fix debug message.
The [path] field of [Fingerprint] contains the "Hash of the path to the base source file".
2019-12-28 03:36:38 +01:00
Jonas Platte
2166db8c49
Add a note to the error message for using --feature / --no-default-features in a virtual workspace 2019-12-24 14:46:16 +01:00
Eric Huss
829ddf0dc8 Fix config env vars that are prefix of another with underscore. 2019-12-23 18:13:50 -08:00
bors
86134e7666 Auto merge of #7739 - giraffate:follow_up_d1d083789, r=Eh2406
Correct reference link

Follow up d1d083789.
2019-12-23 16:08:07 +00:00
bors
b42bec7f99 Auto merge of #7706 - matthiaskrgr:bump_git, r=Eh2406
bump git2 dependencies

This required some manual code changes which dependabot could not perform.
2019-12-23 15:10:46 +00:00
Takayuki Nakata
22db875b0e Correct reference link
Follow up d1d083789.
2019-12-23 12:00:22 +09:00
bors
2f529296cb Auto merge of #7738 - JohnTitor:issue-none, r=ehuss
Use issue = "none" instead of "0"

Replace `issue = "0"` with `"none"`

CC: rust-lang/rust#67496
2019-12-22 17:54:52 +00:00
bors
de4a5c906b Auto merge of #7737 - Mark-Simulacrum:cache-not-mem, r=ehuss
Read cached output line-by-line

This avoids loading potentially gigabytes of output into memory, which
can cause OOMs.

Fixes #7736.

This does not add a test as I don't really want to generate gigabytes of output (that seems like a bad idea) -- and it's unclear how to test other than by causing OOM on (most) CI systems, and it's unlikely that we'll actually regress here.
2019-12-22 17:35:34 +00:00
Yuki Okushi
0dd60d5df9 Use issue = "none" instead of "0" 2019-12-22 17:21:13 +09:00
bors
741f0e586a Auto merge of #7733 - ehuss:doc-updates, r=Eh2406
Various doc updates

This is a collection of documentation updates that have been in my todo list for a while. Each change is in a separate commit.

The "features" chapter will probably get significant changes in the future, as it is pretty bare right now. Similarly the "workspace" chapter could probably use more examples.

Closes #3062
Closes #3817
Closes #3971
Closes #4212
Closes #4438
Closes #4756
Closes #5822
Closes #6913
Closes #7055
2019-12-22 03:42:20 +00:00
Mark Rousskov
5e64197f91 Read cached output line-by-line
This avoids loading potentially gigabytes of output into memory, which
can cause OOMs.
2019-12-21 22:05:08 -05:00
Eric Huss
493eb34327 Note that harness=false enables cfg(test). 2019-12-21 16:36:15 -08:00
Eric Huss
c2ff76287b Add build script examples to reference index. 2019-12-21 16:36:15 -08:00
Eric Huss
d1d0837891 Move overriding dependencies into a separate chapter. 2019-12-21 16:36:02 -08:00
bors
7c2caddf19 Auto merge of #7734 - ehuss:version-bump, r=Eh2406
Bump to 0.43.0, Update changelog
2019-12-22 00:07:30 +00:00
Eric Huss
6d190fec37 Fix typo. 2019-12-21 14:53:56 -08:00
Eric Huss
57020a5d53 Update changelog for 1.41. 2019-12-21 14:47:27 -08:00
Eric Huss
e77351a555 Move nightly-only changes to dedicated sections. 2019-12-21 14:14:10 -08:00
Eric Huss
b52a01e360 Bump to 0.43.0 2019-12-21 14:13:53 -08:00
Eric Huss
543e38175c Add a table of contents for the manifest.
Closes #5822
2019-12-20 21:28:27 -08:00
Eric Huss
dc81356ef1 Move features to a separate chapter. 2019-12-20 21:18:39 -08:00
Eric Huss
f453bed7f5 Move workspaces to a separate chapter. 2019-12-20 18:53:59 -08:00
Eric Huss
0f99322f93 Move cargo targets to a new chapter.
Closes #6913.
2019-12-20 16:29:09 -08:00
Eric Huss
0a5f54b5dc Don't describe the package layout twice. 2019-12-20 09:55:06 -08:00
Eric Huss
e5bc8cc6e4 Try to clarify dev/test profile selection.
Closes #4438
2019-12-19 18:20:14 -08:00
Matthias Krüger
8245e02924 bump git2 dependencies 2019-12-19 23:29:41 +01:00
Eric Huss
018b5f5923 Document that [replace] should not be used.
cc #7092
2019-12-19 14:21:44 -08:00
Eric Huss
e958fe630d Clarify that [replace] requires a version number.
Closes #4212
2019-12-19 14:17:14 -08:00
Eric Huss
47a46ae77a Try to be clearer about how --target is different.
Closes #3817
2019-12-19 13:57:27 -08:00
Eric Huss
caf88f5cea Try to make it a little clearer that cargo package/publish will rebuild from scratch.
Closes #3062
2019-12-19 13:33:13 -08:00
Eric Huss
18e02dad28 Show example for 'cfg(feature="foo")' dependency alternative. 2019-12-19 13:26:14 -08:00
Eric Huss
82bcbdefbc Break up the Platform specific dependencies section. 2019-12-19 13:24:13 -08:00
bors
d5e20a9b7f Auto merge of #7721 - ehuss:fix-doc-build-indent, r=Eh2406
Fix indentation mistake in doc comment.

The `build` directory should be under `debug`.
2019-12-19 20:02:35 +00:00
Eric Huss
14f7a91354 Build script change detection: link to include/exclude 2019-12-19 11:46:24 -08:00
bors
bc1f0b5e36 Auto merge of #7724 - ehuss:update-config-tracking-issue, r=alexcrichton
Add config tracking issue links.
2019-12-19 19:45:09 +00:00
Eric Huss
edcaab8042 Add config tracking issue links. 2019-12-19 11:29:02 -08:00
Eric Huss
28cabee6f4 Fix indentation mistake in doc comment.
The `build` directory should be under `debug`.
2019-12-19 11:10:35 -08:00
Eric Huss
c4033d327f Mention cargo metadata for custom subcommands. 2019-12-19 10:30:27 -08:00
Eric Huss
765c80da03 Describe dep-info files a little better. 2019-12-19 10:25:32 -08:00
Eric Huss
fee34fcf65 Clarify cargo fix behavior with features. 2019-12-19 10:11:17 -08:00
bors
e37f62fe48 Auto merge of #7649 - ehuss:config2, r=alexcrichton
Config enhancements.

This is a collection of changes to config handling. I intended to split this into separate PRs, but they all built on one another so I decided to do it as one. However, I can still split this up if desired.

High level overview:

- Refactorings, mainly to remove `pub` from `Config::get_table` and use serde API instead.
- Add `--config` CLI option.
- Add config `include` to include other files.

This makes some progress on #5416.
Closes #6699.

This makes a minor user-visible change in regards to `StringList` types. If an array is specified in a config as a list, and also as an env var, they will now be merged. Previously the environment variable overrode the file value. But if it is a string, then it won't join (env var takes precedence). I can probably change this, but I'm not sure if the old behavior is desired, or if it should merge all the time?

**Future plans**
This lays the groundwork for some more changes:
- Work on #7253 (`debug-assertions` and `debug` fails in environment vars). I have some ideas to try.
- Consider removing use of `get_list` for `paths`, and use a `Vec<ConfigRelativePath>`. This will require some non-trivial changes to how `ConfigSeqAccess` works. This is one of the last parts that does not use the serde API.
- Possibly change `[source]` to load config values in a lazy fashion. This will unlock the ability to use environment variables with source definitions (like CARGO_SOURCE_CRATES_IO_REPLACE_WITH).
- Possibly change `[profile]` to load config profiles in a lazy fashion. This will make it easier to use environment variables with profiles, particularly with arbitrarily named profiles.
- Possibly remove the case-sensitive environment variables in `-Zadvanced-env`. I think they are just too awkward, and prone to problems. Instead, drive people towards using `--config` instead of env vars.
- Add support for TOML tables in env vars (like `CARGO_PROFILES={my-profile={opt-level=1}})`). I started implementing it, but then looking at the use cases, it didn't seem as useful as I initially thought. However, it's still an option to try.

**Refactoring overview**

- `[source]` table now uses the serde API.
- `[target]` table now uses the serde API. This is complicated since the 'cfg()' entries are different from the triple entries. The 'cfg()' tables are loaded separately, and are accessed from `Config::target_cfgs`. Otherwise, it just uses `config.get` of the specific target.TRIPLE.
    - Moved the target config stuff into `config/target.rs`.
- Various changes to make this work:
    - Added `PathAndArgs` type which replaces `config.get_path_and_args`.
    - Changed `ConfigKey` to track the key parts as a list (instead of a string). This fixes an issue where quoted keys weren't handled properly (like `[foo.'a.b'.bar]`). This also seems to make a little more sense (it was joining parts into a string only to immediately call `split` on it). Changed various APIs to take a `ConfigKey` object instead of a string to avoid that splitting behavior.
    - `ValueDeserializer` now pre-computes the `Definition` so that it can provide a better error message when a value fails to deserialize.

Overall, there shouldn't be significant user-visible changes. Some error messages have changed and warnings have been added for some ignored keys. `-Zadvanced-env` now works for source and target tables, though I'm not really happy with that feature.
2019-12-19 17:55:00 +00:00
Eric Huss
ce7fd68b8b Fix for merge conflict. 2019-12-19 09:54:21 -08:00
Eric Huss
b392e7b682 Adding some config doc comments. 2019-12-19 09:44:02 -08:00
Eric Huss
c7f6528ef9 Add some context to a [target] links deserialize error. 2019-12-19 09:44:02 -08:00
Eric Huss
00a47302dd Fixes for some test errors on Windows. 2019-12-19 09:44:02 -08:00
Eric Huss
e7eda2f91f Implement config-include. 2019-12-19 09:44:02 -08:00