Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/java-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
export CXX=clang++
ldd --version

cargo build --release
cargo build --release --locked
"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
Expand All @@ -135,7 +135,7 @@ jobs:
run: brew install protobuf
- name: Build native lib
working-directory: java/lance-jni
run: cargo build --release
run: cargo build --release --locked
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: liblance_jni_darwin_aarch64.zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: cargo fmt --check
- name: Rust Clippy
working-directory: java/lance-jni
run: cargo clippy --all-targets -- -D warnings
run: cargo clippy --all-targets --locked -- -D warnings

build-and-test-java:
runs-on: ubuntu-24.04-4x
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,16 @@ repos:
rev: v1.26.0
hooks:
- id: typos

# Catch a Cargo.toml change that wasn't reflected in the matching Cargo.lock.
# Runs fully offline (`--frozen` = `--locked` + `--offline`) and does not compile,
# so it stays fast. Checks all three lockfiles since a workspace dep change can
# touch the excluded python/ and java/ locks too.
- repo: local
hooks:
- id: cargo-lock-sync
name: Cargo.lock in sync with Cargo.toml (offline)
entry: bash -c 'for m in Cargo.toml python/Cargo.toml java/lance-jni/Cargo.toml; do cargo metadata --frozen --format-version 1 --manifest-path "$m" >/dev/null 2>&1 || { echo "Cargo.lock is out of date for $m. Refresh it (e.g. cargo check --manifest-path $m) and commit the updated lockfile."; exit 1; }; done'
language: system
files: '(^|/)Cargo\.(toml|lock)$'
pass_filenames: false
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ AWS_DEFAULT_REGION=us-east-1 pytest --run-integration python/tests/test_s3_ddb.p

- Prefer implementing functionality with the standard library or existing workspace dependencies before adding new external crates.
- Keep `Cargo.lock` changes intentional; revert unrelated dependency bumps. Pin broken deps with a comment linking the upstream issue.
- The repo has three lockfiles: the root `Cargo.lock`, `python/Cargo.lock`, and `java/lance-jni/Cargo.lock` (the latter two are excluded from the workspace). A `workspace.dependencies` change must be reflected in all three — refresh the excluded ones with `cargo check --manifest-path python/Cargo.toml` and `cargo check --manifest-path java/lance-jni/Cargo.toml`, then commit the updated lockfiles. The `cargo-lock-sync` pre-commit hook catches a miss offline.
- Gate optional/domain-specific deps behind Cargo feature flags. Prefer separate crates for domain functionality (geo, NLP).

## Testing Standards
Expand Down
6 changes: 6 additions & 0 deletions java/lance-jni/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ repository = "https://github.com/lance-format/lance"
readme = "../../README.md"
description = "JNI bindings for Lance Columnar format"

# `java/lance-jni/` is excluded from the top-level workspace (see ../../Cargo.toml) and
# keeps its own Cargo.lock. Declaring an empty workspace here makes this crate an explicit
# workspace root, so cargo resolves it standalone even when the checkout is nested inside
# another cargo project (e.g. a git worktree placed under the main checkout).
[workspace]

[lib]
crate-type = ["cdylib"]

Expand Down
6 changes: 6 additions & 0 deletions python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ rust-version = "1.91"
exclude = ["python/lance/conftest.py"]
publish = false

# `python/` is excluded from the top-level workspace (see ../Cargo.toml) and keeps
# its own Cargo.lock. Declaring an empty workspace here makes this crate an explicit
# workspace root, so cargo resolves it standalone even when the checkout is nested
# inside another cargo project (e.g. a git worktree placed under the main checkout).
[workspace]

[lib]
name = "lance"
crate-type = ["cdylib"]
Expand Down
Loading