Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci workspace hack #546

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .config/hakari.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file contains settings for `cargo hakari`.
# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options.

hakari-package = "workspace-hack"

# Format version for hakari's output. Version 4 requires cargo-hakari 0.9.22 or above.
dep-format-version = "4"

# Setting workspace.resolver = "2" in the root Cargo.toml is HIGHLY recommended.
# Hakari works much better with the new feature resolver.
# For more about the new feature resolver, see:
# https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver
resolver = "2"

# Add triples corresponding to platforms commonly used by developers here.
# https://doc.rust-lang.org/rustc/platform-support.html
platforms = [
# "x86_64-unknown-linux-gnu",
# "x86_64-apple-darwin",
# "x86_64-pc-windows-msvc",
]

# Write out exact versions rather than a semver range. (Defaults to false.)
# exact-versions = true

unify-target-host = "unify-if-both"

[traversal-excludes]
third-party = [
# Why regex and prost might be compile multiply times?
{ name = "regex" },
{ name = "prost" },
]
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ repos:
stages: [ commit-msg ]
- id: cargo-sort
name: Check Cargo.toml is sorted
description: 'Ensure Cargo.toml is sorted'
description: Ensure Cargo.toml is sorted
entry: bash -c 'cargo sort --workspace'
language: rust
types: [ file, toml ]
files: Cargo\.toml
pass_filenames: false
- id: cargo-hakari
name: Check if workspace-hack works correctly
description: Ensure workspace-hack works correctly
entry: bash -c 'cargo hakari generate --diff && cargo hakari manage-deps --dry-run && cargo hakari verify'
language: rust
files: Cargo\.(toml|lock)
pass_filenames: false
Loading
Loading