-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no cmake, no protoc, no problems (#256)
* Simplify setup and build by removing reliance on `cmake` and `protoc` * [Fixes `Cargo.lock` issue](https://trunk-io.slack.com/archives/C02CMS4TFUJ/p1734464030801369) seen in `context-ruby` * Fix running Clippy * Fix running `rust-analyzer` * Fix `cargo check` lints * Fix imports of dependencies with inconsistent versions
- Loading branch information
1 parent
107654f
commit 9dfffcf
Showing
19 changed files
with
265 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,8 @@ runtimes: | |
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- rust@2024-05-01 | ||
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) | ||
lint: | ||
enabled: | ||
|
@@ -24,15 +24,15 @@ lint: | |
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- clippy@1.81.0 | ||
- clippy@2024-05-01 | ||
- [email protected] | ||
- git-diff-check | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- rustfmt@1.81.0 | ||
- rustfmt@2024-05-01 | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
|
@@ -48,9 +48,43 @@ lint: | |
run: pyright -p context-py --outputjson | ||
target: . | ||
batch: false | ||
- name: clippy | ||
runtime: rust | ||
environment: | ||
- name: PATH | ||
list: ["${runtime}", "${env.PATH}"] | ||
commands: | ||
- name: lint | ||
run: | ||
cargo clippy --message-format json --locked --all-targets --all-features -- | ||
--cap-lints=warn --no-deps | ||
output: clippy | ||
target: ${parent_with(Cargo.toml)} | ||
success_codes: [0, 101, 383] | ||
run_from: ${target_directory} | ||
disable_upstream: true | ||
- name: rustfmt | ||
runtime: rust | ||
commands: | ||
- name: format | ||
output: rewrite | ||
read_output_from: stdout | ||
stdin: true | ||
success_codes: [0] | ||
cache_results: false # sometimes caches an empty file for some reason | ||
in_place: false | ||
batch: false | ||
run: rustfmt --edition=2021 | ||
ignore: | ||
- linters: [ALL] | ||
paths: | ||
# Ignore generated files | ||
- target/** | ||
- "**/target/**" | ||
actions: | ||
definitions: | ||
- id: generate-pyi | ||
runtime: rust | ||
description: Generate Python stubs | ||
# Don't use hermetic runtime so we can use nightly cargo | ||
run: | | ||
|
@@ -63,36 +97,33 @@ actions: | |
- trunk-fmt-pre-commit | ||
- trunk-upgrade-available | ||
downloads: | ||
- name: protoc | ||
- name: rust | ||
downloads: | ||
- os: | ||
linux: linux | ||
macos: osx | ||
macos: apple-darwin | ||
linux: unknown-linux-gnu | ||
cpu: | ||
x86_64: x86_64 | ||
arm_64: aarch_64 | ||
url: https://github.com/protocolbuffers/protobuf/releases/download/v${version}/protoc-${version}-${os}-${cpu}.zip | ||
- os: | ||
windows: windows | ||
cpu: | ||
x86_64: x86_64 | ||
url: https://github.com/protocolbuffers/protobuf/releases/download/v29.1/protoc-29.1-win64.zip | ||
arm_64: aarch64 | ||
url: https://static.rust-lang.org/dist/${version}/rust-nightly-${cpu}-${os}.tar.gz | ||
strip_components: 2 | ||
- name: rust-src | ||
downloads: | ||
- url: https://static.rust-lang.org/dist/${version}/rust-src-nightly.tar.xz | ||
tools: | ||
definitions: | ||
- name: protoc | ||
download: protoc | ||
known_good_version: 29.1 | ||
shims: [protoc] | ||
environment: | ||
- name: PATH | ||
list: ["${tool}/bin"] | ||
health_checks: | ||
- command: protoc --version | ||
parse_regex: libprotoc (\d+\.\d+) | ||
- name: rust-src | ||
download: rust-src | ||
known_good_version: 2024-05-01 | ||
shims: [rust-src] | ||
runtimes: | ||
- ruby | ||
- node | ||
- rust | ||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
# Update `RUST_SRC_PATH` path to `rust-src` if this is updated | ||
# IfChange | ||
- rust-src@2024-05-01 | ||
# ThenChange .envrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.