Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: taiki-e/cargo-hack
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 042bb37456e7e024428854c405974a0ff2067622
Choose a base ref
..
head repository: taiki-e/cargo-hack
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 224536df12602528e0200ad9cb6d80f08b5d01ae
Choose a head ref
Showing with 500 additions and 239 deletions.
  1. +1 −0 .clippy.toml
  2. +49 −0 .cspell.json
  3. +2 −0 .deny.toml
  4. +1 −0 .gitattributes
  5. +131 −0 .github/.cspell/organization-dictionary.txt
  6. +16 −0 .github/.cspell/project-dictionary.txt
  7. +8 −0 .github/.cspell/rust-dependencies.txt
  8. +1 −0 .github/bors.toml
  9. +0 −7 .github/dependabot.yml
  10. +16 −13 .github/workflows/ci.yml
  11. +1 −0 .github/workflows/pr.yml
  12. +10 −1 .github/workflows/release.yml
  13. +0 −3 .gitignore
  14. +18 −1 CHANGELOG.md
  15. +3 −7 Cargo.toml
  16. +17 −8 README.md
  17. +19 −10 src/cli.rs
  18. +0 −2 src/context.rs
  19. +3 −4 src/features.rs
  20. +7 −3 src/main.rs
  21. +3 −3 src/manifest.rs
  22. +1 −1 src/metadata.rs
  23. +8 −36 src/process.rs
  24. +1 −1 src/rustup.rs
  25. +2 −3 src/term.rs
  26. +6 −14 tests/auxiliary/build-info/build.rs
  27. +1 −1 tests/auxiliary/build-info/src/lib.rs
  28. +2 −2 tests/auxiliary/mod.rs
  29. +1 −0 tests/fixtures/default_feature_behavior/has_default/src/lib.rs
  30. +1 −0 tests/fixtures/default_feature_behavior/no_default/src/lib.rs
  31. +1 −0 tests/fixtures/keep_going/src/lib.rs
  32. +1 −0 tests/fixtures/namespaced_features/src/lib.rs
  33. +1 −0 tests/fixtures/optional_deps/member2/src/lib.rs
  34. +1 −0 tests/fixtures/optional_deps/member3/src/lib.rs
  35. +1 −0 tests/fixtures/optional_deps/real/src/lib.rs
  36. +1 −0 tests/fixtures/optional_deps/src/lib.rs
  37. +1 −0 tests/fixtures/package_collision/member1/src/lib.rs
  38. +1 −0 tests/fixtures/package_collision/member2/src/lib.rs
  39. +1 −0 tests/fixtures/powerset_deduplication/member1/src/lib.rs
  40. +1 −0 tests/fixtures/powerset_deduplication/src/lib.rs
  41. +1 −0 tests/fixtures/real/member1/src/lib.rs
  42. +1 −0 tests/fixtures/real/member2/src/lib.rs
  43. +1 −0 tests/fixtures/real/member3/src/lib.rs
  44. +1 −0 tests/fixtures/real/src/lib.rs
  45. +1 −0 tests/fixtures/virtual/dir/not_find_manifest/src/lib.rs
  46. +1 −0 tests/fixtures/virtual/member1/src/lib.rs
  47. +1 −0 tests/fixtures/virtual/member2/src/lib.rs
  48. +3 −3 tests/long-help.txt
  49. +3 −3 tests/short-help.txt
  50. +12 −59 tests/test.rs
  51. +38 −22 tools/publish.sh
  52. +98 −32 tools/tidy.sh
1 change: 1 addition & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
avoid-breaking-exported-api = false
disallowed-methods = [
# https://internals.rust-lang.org/t/synchronized-ffi-access-to-posix-environment-variable-functions/15475
{ path = "std::env::remove_var", reason = "this function should be considered `unsafe`" },
49 changes: 49 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "0.2",
"gitignoreRoot": ".",
"useGitignore": true,
"dictionaryDefinitions": [
{
"name": "organization-dictionary",
"path": "./.github/.cspell/organization-dictionary.txt",
"addWords": true
},
{
"name": "project-dictionary",
"path": "./.github/.cspell/project-dictionary.txt",
"addWords": true
},
{
"name": "rust-dependencies",
"path": "./.github/.cspell/rust-dependencies.txt",
"addWords": true
}
],
"dictionaries": [
"organization-dictionary",
"project-dictionary",
"rust-dependencies"
],
"ignoreRegExpList": [
// Copyright notice
"Copyright ((\\(c\\)|\\(C\\)|©) )?.*",
// GHA actions/workflows
"uses: .+@",
// GHA context (repo name, owner name, etc.)
"github.\\w+ (=|!)= '.+'",
// GH username
"( |\\[)@[\\w_-]+",
// Git config username
"git config user.name .*",
// Cargo.toml authors
"authors *= *\\[.*\\]",
"\".* <[\\w_.+-]+@[\\w.-]+>\""
],
"languageSettings": [
{
"languageId": ["*"],
"dictionaries": ["rust"]
}
],
"ignorePaths": []
}
2 changes: 2 additions & 0 deletions .deny.toml
Original file line number Diff line number Diff line change
@@ -2,8 +2,10 @@
[advisories]
vulnerability = "deny"
unmaintained = "deny"
unsound = "deny"
yanked = "deny"
notice = "deny"
git-fetch-with-cli = true
ignore = []

# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* text=auto eol=lf
.github/.cspell/rust-dependencies.txt linguist-generated
131 changes: 131 additions & 0 deletions .github/.cspell/organization-dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
// This is a dictionary shared by projects under https://github.com/taiki-e.
// It is not intended for manual editing.

endo
taiki

// tool name and its configs or options
asan
cflags
clippy
codegen
cxxflags
exitcode
miri
miriflags
msan
retag
rustc
rustdoc
rustdocflags
rustflags
rustfmt
rustsec
rustup
valgrind
xcompile
Zdoctest
Zmiri

// Rust target triple
aarch
androideabi
armeb
armebv
armv
asmjs
atmega
bpfeb
bpfel
cuda
eabi
eabihf
emscripten
espidf
fortanix
gnuabi
gnueabi
gnueabihf
gnullvm
gnuspe
gnux
illumos
imac
loongarch
macabi
mipsel
mipsisa
msvc
muslabi
musleabi
musleabihf
newlibeabihf
nvptx
openwrt
riscv
softfloat
sparcv
thumbeb
thumbebv
thumbv
tvos
uclibc
uclibceabi
uclibceabihf
uefi
vxworks
wasi
watchos
xous

// Rust other
acqrel
alloc
bools
builtins
canonicalize
consts
deque
doctest
hasher
impls
inlateout
intrinsics
lateout
msrv
nand
nomem
nostack
peekable
punct
repr
rfind
rfold
rsplit
rustlib
seqcst
splitn
supertrait
supertraits
sysroot
toolchains
uninit
unsized
upcastable

// Other
connrefused
cygwin
dpkg
euxo
msys
noninteractive
noprofile
norc
nproc
objdump
pipefail
powerset
proto
readelf
tlsv
16 changes: 16 additions & 0 deletions .github/.cspell/project-dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
binstall
compat
curr
libc
multitarget
paru
qpmember
renemed
SIGINT
SIGTERM
subcmd
subcrate
tempdir
tmpdir
tmppath
vvpmember
8 changes: 8 additions & 0 deletions .github/.cspell/rust-dependencies.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
status = ["ci"]
timeout_sec = 7200
7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -7,10 +7,3 @@ updates:
commit-message:
prefix: ''
labels: []
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
commit-message:
prefix: ''
labels: []
29 changes: 16 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ on:

env:
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
@@ -34,7 +35,7 @@ jobs:
with:
event_name: ${{ github.event_name }}
tidy:
uses: taiki-e/workflows/.github/workflows/tidy-rust.yml@main
uses: taiki-e/workflows/.github/workflows/tidy.yml@main

test:
strategy:
@@ -49,6 +50,7 @@ jobs:
- rust: nightly
os: windows-2019
runs-on: ${{ matrix.os || 'ubuntu-18.04' }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
@@ -86,32 +88,31 @@ jobs:
os: windows-2019
- target: x86_64-unknown-freebsd
runs-on: ${{ matrix.os || 'ubuntu-18.04' }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Rust
run: rustup update stable --no-self-update
- run: rustup target add ${{ matrix.target }}
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
if: (matrix.os == '' || startsWith(matrix.os, 'ubuntu')) && !contains(matrix.target, '-musl')
- uses: taiki-e/install-action@cross
if: matrix.os == '' || startsWith(matrix.os, 'ubuntu')
if: contains(matrix.target, '-musl')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}"
if: endsWith(matrix.target, 'windows-msvc')
- run: echo "cargo=cross" >>"${GITHUB_ENV}"
if: matrix.target != 'x86_64-unknown-linux-gnu' && (matrix.os == '' || startsWith(matrix.os, 'ubuntu'))
if: contains(matrix.target, '-musl')
- run: $cargo build --target ${{ matrix.target }}
- run: $cargo build --target ${{ matrix.target }} --release
# For debugging
# - uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.target }}
# path: target/${{ matrix.target }}/release/cargo-hack.exe
# if: startsWith(matrix.os, 'windows')
# - uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.target }}
# path: target/${{ matrix.target }}/release/cargo-hack
# if: "!startsWith(matrix.os, 'windows')"
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}
path: target/${{ matrix.target }}/release/cargo-hack*

test-compat:
name: test (1.${{ matrix.rust }})
@@ -128,6 +129,7 @@ jobs:
- 39
- 41
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
@@ -147,6 +149,7 @@ jobs:
# prettier-ignore
needs: [deny, msrv, tidy, test, build, test-compat] # tidy:needs
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
- name: Mark the job as a success
run: exit 0
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ jobs:
dependabot:
if: startsWith(github.head_ref, 'dependabot/') && github.repository_owner == 'taiki-e'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: taiki-e/github-actions/update-dependabot-pr@main
with:
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ on:

env:
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
@@ -25,6 +26,7 @@ jobs:
create-release:
if: github.repository_owner == 'taiki-e'
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
@@ -64,15 +66,22 @@ jobs:
- target: x86_64-pc-windows-msvc
os: windows-2019
- target: x86_64-unknown-freebsd
- target: universal-apple-darwin
os: macos-11
runs-on: ${{ matrix.os || 'ubuntu-18.04' }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Rust
run: rustup update stable --no-self-update
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
if: (matrix.os == '' || startsWith(matrix.os, 'ubuntu')) && !contains(matrix.target, '-musl')
- uses: taiki-e/install-action@cross
if: matrix.os == '' || startsWith(matrix.os, 'ubuntu')
if: contains(matrix.target, '-musl')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}"
if: endsWith(matrix.target, 'windows-msvc')
- uses: taiki-e/upload-rust-binary-action@v1
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,9 +2,6 @@ target
# There is binary in the workspace, but intentionally not committing lockfile.
# See https://github.com/taiki-e/cargo-llvm-cov/pull/152#issuecomment-1107055622 for more.
Cargo.lock
node_modules
package-lock.json
package.json

# For platform and editor specific settings, it is recommended to add to
# a global .gitignore file.
Loading