169 Commits

Author SHA1 Message Date
Alex Crichton
f9d4927b26 Partially revert dep changes in #5651
Some logic which was tweaked around the dependencies of build script targets was
tweaked slightly in a way that causes cargo to stack overflow by accientally
adding a dependency loop. This commit implements one of the strategies discussed
in #5711 to fix this situation.

The problem here is that when calculating the deps of a build script we need the
build scripts of *other* packages, but the exact profile is somewhat difficult
to guess at the moment we're generating our build script unit. To solve this the
dependencies towards other build scripts' executions is added in a different
pass after all other units have been assembled. At this point we should know for
sure that all build script executions are in the dependency graph, and we just
need to add a few more edges.

Closes #5708
2018-07-13 10:54:22 -07:00
Eric Huss
00d325db0f Fix doctests linking too many libs.
Fixes #5650.  cc #5435

As part of my recent work on profiles, I introduced some situations where a
library can be compiled multiple times with different settings.  Doctests were
greedily grabbing all dependencies for a package, regardless of which target
is was for.  This can cause doctests to fail if it links multiple copies of
the same library.

One way to trigger this is `cargo test --release` if you have dependencies, a
build script, and `panic="abort"`.  There are other (more obscure) ways to
trigger it with profile overrides.
2018-06-25 18:00:04 -07:00
Alex Crichton
1759b30cf7 Cop out on fixing a spurious test failure
This commit cops out trying to fix `rename_with_link_search_path` by simply
adding a loop on Windows to retry the operation that looks to need retrying.
2018-05-05 11:47:41 -07:00
Aleksey Kladov
739cc2078d FIx false positive warning
We warn if a feature was specified corresponding to a dependency which
is not optional. However, a dependency can be both optional and
required, and we shouldn't warn in that case.
2018-05-05 20:18:37 +03:00
bors
5986492773 Auto merge of #5480 - alexcrichton:fix-regr, r=matklad
Fix optional deps in multiple sections

This commit fixes an issue where an optional dependency was listed multiple
times in a manifest (multiple sections). This regression was introduced by #5415
and happened because in the resolver we didn't record a `Dependency` as it was
accidentally deduplicated too soon.

The fix here was to ensure that all `Dependency` annotations make their way into
`Resolve` now that we rely on the listed `Dependency` values for correctness.

Closes #5475
2018-05-04 21:07:15 +00:00
Alex Crichton
2f88a70407 Fix optional deps in multiple sections
This commit fixes an issue where an optional dependency was listed multiple
times in a manifest (multiple sections). This regression was introduced by #5415
and happened because in the resolver we didn't record a `Dependency` as it was
accidentally deduplicated too soon.

The fix here was to ensure that all `Dependency` annotations make their way into
`Resolve` now that we rely on the listed `Dependency` values for correctness.

Closes #5475
2018-05-04 14:06:59 -07:00
Aleksey Kladov
25cab498a5 Try to diagnose/fix spurious windows error with better rm -r 2018-05-04 18:02:57 +03:00
Aleksey Kladov
d57f6b0563 Revert "Attmept to fix a spurious failure on AppVeyor"
This reverts commit db3328f8f7b96701faa62756a0d55ed71899d894.

We get spurious errors for thouse tests even with debug info disabled,
so let's reenable it back.
2018-05-04 17:53:10 +03:00
Alex Crichton
db3328f8f7 Attmept to fix a spurious failure on AppVeyor
I *think* the issue is that `link.exe` is generating debuginfo in the background
which keeps the file open and prevents us from deleting it, but hopefully by
disabling debug information we'll either be able to confirm or deny this
hypothesis.
2018-05-03 08:57:36 -07:00
Eric Huss
83b8c234a1 Fix "DEBUG" env var in build.rs for debug=0.
Fixes #5370
2018-04-30 10:17:43 -07:00
Henrik Laxhuber
3ebdc722c6
Moved RUSTC_LINKER test into its own fn 2018-04-24 08:18:33 +02:00
Henrik Laxhuber
4628011e79
Fixed RUSTC_LINKER test for Windows hosts 2018-04-23 18:28:38 +02:00
Henrik Laxhuber
1469523348
Fixed build script env var test 2018-04-23 17:45:17 +02:00
Henrik Laxhuber
1d36411cc4
Added tests for RUSTC_LINKER buils script env var
Added tests for the environment variable RUSTC_LINKER that is
passed to the build script.
Also slightly improved readability of the code responsible for
passing the env var.
2018-04-23 17:11:10 +02:00
memoryleak47
57a7e12679 fixed a few typos 2018-04-05 03:45:15 +02:00
Aleksey Kladov
b0c181d91c Prettify rustfmted single-line strings 2018-03-14 17:48:44 -07:00
Alex Crichton
1e6828485e cargo fmt 2018-03-14 17:48:23 -07:00
Eh2406
68a40ad42b Merge remote-tracking branch 'origin/master' into links 2018-02-21 15:41:48 -05:00
André Rocha
c2ff988c9f Reorganize integration tests as one crate with many modules. Issue #4867. 2018-02-21 13:33:51 -05:00