hi-rustin
6351472a80
Add --message-format for install
...
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-21 12:16:50 +08:00
David Tolnay
05f6604660
Swap out some outdated repo urls in documentation
2021-08-31 13:33:02 -07:00
Nipunn Koorapati
f9c2d04592
Factor into struct InstallablePackage
2021-08-19 09:57:53 -07:00
Weihang Lo
8c75e2ffa0
Update tests to use registry names
2021-07-22 00:50:30 +08:00
Joshua Nelson
9c7cc545d7
Combine rustc and cargo's diagnostic summaries
...
This works by introspecting rustc's error output, using the JSON format
to determine whether it's a warning or error, then skipping it
altogether if it's a summary of the diagnostics printed.
Before:
```
src/main.rs:1:10: warning: trait objects without an explicit `dyn` are deprecated
src/main.rs:1:1: error[E0601]: `main` function not found in crate `wrong`
src/main.rs:1:9: error[E0038]: the trait `Clone` cannot be made into an object
error: aborting due to 2 previous errors; 1 warning emitted
error: could not compile `wrong`
```
After:
```
$ cargo check --message-format short
src/main.rs:1:10: warning: trait objects without an explicit `dyn` are deprecated
src/main.rs:1:1: error[E0601]: `main` function not found in crate `wrong`
src/main.rs:1:9: error[E0038]: the trait `Clone` cannot be made into an object
error: could not compile `wrong` due to 2 previous errors; 1 warning emitted
```
2021-07-06 19:46:27 -04:00
hi-rustin
b3a1d0ceba
Only testing on linux
2021-06-22 15:36:32 +08:00
hi-rustin
cb1a3f05f0
Detect incorrectly named cargo.toml for build
2021-06-22 15:31:28 +08:00
hi-rustin
a2f903275a
Detect incorrectly named cargo.toml for install --path
2021-06-22 15:31:28 +08:00
hi-rustin
d9daaf7a84
Detect incorrectly named cargo.toml for install --git
2021-06-22 15:31:21 +08:00
hi-rustin
5e86dd455d
Add more details when installing git repository errors
2021-06-14 14:41:49 +08:00
Eric Huss
9387a308f4
Fix cargo install
with a semver metadata version.
2021-05-08 17:21:52 -07:00
Kornel
6977dee109
Explain cargo install
is not for libraries
2021-03-03 17:10:56 +00:00
Horaci Macias
dab646eee0
Do not exit prematurely if anything failed installing.
...
https://github.com/rust-lang/cargo/issues/9180
2021-02-19 09:53:46 +01:00
CPerezz
b526fadca4
Impl warn for locked install withoud Cargo.lock
...
If we're installing in --locked mode and there's no `Cargo.lock` published
ie. the bin was published before https://github.com/rust-lang/cargo/pull/7026
the cargo install errors were not stating that it was due to the lack of
the `Cargo.lock` file. Instead, the error seemed completely unrelated.
Therefore, this tries to address this by adding a warn in the stderr
output.
Closes #9106
2021-01-30 01:09:16 +01:00
Eric Huss
b04c7fb849
Add suggestion for bad package id.
2021-01-22 13:38:53 -08:00
Weihang Lo
b9554f37ab
rustfmt
2020-10-28 02:57:22 +08:00
Weihang Lo
9d9c321c27
test: check cargo uninstall package opt with empty value
2020-10-28 02:46:20 +08:00
Eric Huss
6f8c7d5a87
Normalize raw string indentation.
2020-09-26 17:59:58 -07:00
bors
f110fd9fc1
Auto merge of #8681 - weihanglo:fix/redundant-messsage-local-crate-install, r=ehuss
...
Sweep unrelated message from unnecessary workspace infromation
Resolves #8619
Only pass workspace information when the source is from a local crate installation.
2020-09-10 18:40:48 +00:00
Weihang Lo
a527caa248
test: check stderr containment explicitly
2020-09-10 07:57:57 +08:00
Weihang Lo
45cfd0cd12
Fix formatting
2020-09-10 00:26:30 +08:00
Weihang Lo
71cae39de0
Test for crate installation without emitting messages from cwd
2020-09-10 00:20:35 +08:00
bors
875e012325
Auto merge of #8655 - camelid:patch-1, r=ehuss
...
Lowercase and remove periods in error messages for consistency
2020-09-08 20:17:21 +00:00
Camelid
82c834cec2
Update tests
2020-09-07 10:57:00 -07:00
Philipp Oppermann
c5d8dcb323
Reload unstable table from config file in reload_rooted_at
2020-08-27 11:07:53 +02:00
bishtpawan
3952fdb223
Refactor code and resolve PR comments
2020-08-05 17:46:33 +05:30
bishtpawan
dd654d5576
Add pattern match for yank check and updated corresponding test cases
2020-08-05 17:31:56 +05:30
bishtpawan
844cde203f
Add test case for yank validation check
2020-08-05 17:31:56 +05:30
bl2e
538d925920
Fix post-execution path checks to be compatible with Windows
2020-06-20 23:37:56 -07:00
bl2e
bb3754276a
Fix test compatibility for Windows
2020-06-20 23:01:35 -07:00
bl2e
1f2de1e0a7
Add test for cargo install
option --target-dir
2020-06-20 17:50:20 -07:00
kellda
1e0d38061c
Add test for cargo install --index
2020-06-10 15:26:26 +00:00
Eric Huss
80e55c774b
Fix tests with enoent error message on non-english systems.
2020-05-29 12:34:17 -07:00
Daniel Wagner-Hall
556c236f9a
Bump to semver 0.10 for VersionReq::is_exact
...
This stops using `to_string` as a proxy for this now-provided precise API.
This reverts commit b71927224f
and bupms the
dependency version in Cargo.toml.
2020-05-25 11:11:45 +01:00
Daniel Wagner-Hall
b71927224f
Switch to using existing is_locked implementation
...
semver hasn't merged the upstream PR (yet)
2020-05-20 20:38:23 +01:00
Daniel Wagner-Hall
624ce68126
Merge branch 'master' into trywithout
2020-05-02 11:50:14 +01:00
Eric Huss
5bd74c41c4
Fix error with git repo discovery and symlinks.
2020-04-30 13:45:58 -07:00
Daniel Wagner-Hall
ad065e7414
Merge branch 'master' into trywithout
2020-04-20 22:52:35 +01:00
Odin Dutton
0c14dc2e74
Improve error message when running cargo install .
2020-04-20 13:16:11 +10:00
Eric Huss
4ae79d2ffd
Use fs helpers instead of File functions.
2020-04-17 07:56:16 -07:00
Daniel Wagner-Hall
137e518d98
Explicitly check whether installed first instead
2020-03-21 00:04:17 +00:00
Matthias Krüger
1d912002e9
fix most remaining clippy findings (mostly redundant imports)
2020-02-21 12:15:16 +01:00
Christian Duerr
ae8dee513d
Test that git install reads virtual manifest
2020-01-20 00:41:30 +01:00
Christian Duerr
a08fe088b3
Fix failing test
2020-01-20 00:41:30 +01:00
Eric Huss
00a47302dd
Fixes for some test errors on Windows.
2019-12-19 09:44:02 -08:00
Eric Huss
83571aee56
Minor testsuite organization.
2019-11-24 18:42:45 -08:00
Eric Huss
f7b29716ed
Stabilize install-upgrade.
2019-11-11 14:47:48 -08:00
Eric Huss
d6d15141f8
Wrap some really long lines.
...
These do not wrap due to https://github.com/rust-lang/rustfmt/issues/3863 .
2019-10-18 15:17:59 -07:00
Jonas Schievink
26229cd8ad
Uncapitalize "Could not compile" error message
...
"could not compile ..." matches other Cargo and rustc errors and
warnings better.
2019-09-17 00:50:49 +02:00
Alex Crichton
ebd10526f3
Run rustfmt
2019-09-16 12:00:12 -07:00