Skip to content

Make dependencies.py check all subdirectories for cargo toml files - #1370

Merged
kevinjqliu merged 7 commits into
apache:mainfrom
kevinjqliu:kevinjqliu/generate-all-crates
May 22, 2025
Merged

kevinjqliu merged 7 commits into
apache:mainfrom
kevinjqliu:kevinjqliu/generate-all-crates

Conversation

@kevinjqliu

@kevinjqliu kevinjqliu commented May 22, 2025 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

What changes are included in this PR?

Instead of hardcoding a few repos to check in dependencies.py, lets walk down all subdirectories and get all with Cargo.toml file. This is more future proof in case we add new crates.

We also need to regenerate license for 0.5.0

python3 ../scripts/dependencies.py check
python3 ../scripts/dependencies.py generate

which added 7 new files:

crates/catalog/s3tables/DEPENDENCIES.rust.tsv
crates/examples/DEPENDENCIES.rust.tsv
crates/integration_tests/DEPENDENCIES.rust.tsv
crates/integrations/cache-moka/DEPENDENCIES.rust.tsv
crates/integrations/cli/DEPENDENCIES.rust.tsv
crates/sqllogictest/DEPENDENCIES.rust.tsv
crates/test_utils/DEPENDENCIES.rust.tsv

Are these changes tested?

@kevinjqliu

Copy link
Copy Markdown
Contributor Author

Note, the license check currently fails with:

Checking dependencies of /Users/kevinliu/repos/iceberg-rust/crates/integrations/cli
error[rejected]: failed to satisfy license requirements
  ┌─ registry+https://github.com/rust-lang/crates.io-index#[email protected]:4:12
  │
4 │ license = "BSL-1.0"
  │            ━━━━━━━
  │            │
  │            license expression retrieved via Cargo.toml `license`
  │            rejected: license is not explicitly allowed
  │
  ├ BSL-1.0 - Boost Software License 1.0:
  ├   - OSI approved
  ├   - FSF Free/Libre
  ├ clipboard-win v5.4.0
    └── rustyline v15.0.0
        └── datafusion-cli v47.0.0
            └── iceberg-cli v0.5.0

BSL-1.0 is not allowed in ASF projects. See https://www.apache.org/legal/resolved.html#category-x for Business Source License 1.1

@Fokko

Fokko commented May 22, 2025

Copy link
Copy Markdown
Contributor

@kevinjqliu Acronyms 🫠 According to clipboard-win on crates.io it refers to the Boost Software License 1.0, which is category-A 👍 So we can add that one to the accepted list.

@kevinjqliu

Copy link
Copy Markdown
Contributor Author

Great catch!! Very nice, I've added to the allow list.

This PR should be good to go. I need to first merge #1366 and then rebase

@kevinjqliu
kevinjqliu force-pushed the kevinjqliu/generate-all-crates branch from ff0f703 to 8d5a6bf Compare May 22, 2025 21:54
@kevinjqliu

Copy link
Copy Markdown
Contributor Author

Merged #1366 and rebased, thanks fokko

Comment thread deny.toml Outdated
exceptions = [
# Boost Software License Version 1.0 is allowed (Category-A):
# https://www.apache.org/legal/resolved.html#category-a
{ allow = ["BSL-1.0"], crate = "clipboard-win" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add BSL-1.0 to the allow list above, since it is category A.

@kevinjqliu

Copy link
Copy Markdown
Contributor Author

Moved BSL-1.0 to allowlist instead of exception. I reran both of these commands and everything looks ✅

python3 ../scripts/dependencies.py check
python3 ../scripts/dependencies.py generate

@kevinjqliu
kevinjqliu merged commit 4cb0cd5 into apache:main May 22, 2025
@kevinjqliu
kevinjqliu deleted the kevinjqliu/generate-all-crates branch May 22, 2025 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants