Skip to content

feat: disable default features on internal use#5372

Merged
jackye1995 merged 3 commits intolance-format:mainfrom
valkum:aws-fix
Dec 5, 2025
Merged

feat: disable default features on internal use#5372
jackye1995 merged 3 commits intolance-format:mainfrom
valkum:aws-fix

Conversation

@valkum
Copy link
Copy Markdown
Contributor

@valkum valkum commented Nov 28, 2025

Part of lancedb/lancedb#2771, continuing lancedb/lancedb#2568.
lance-namespace-impls uses lance which pulled in default features (aws,gcp,azure,oss), which pulled aws-* crates into lancedb even when lancedb was used with default-features = false.

I don't have tests at hand, but it would probably be good to run cargo tree -p lance -e no-build -e no-dev --no-default-features -i aws-config in CI (maybe for each crate?) to avoid adding any dependency back by default in a future PR.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@github-actions github-actions Bot added the enhancement New feature or request label Nov 28, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This allows downstream users to avoid pulling in unnecessery
cloud/remote crates.
Copy link
Copy Markdown
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

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

Okay I thought this is disabled together with lance-io but looks like it's not, thanks for the fix!

Comment thread Cargo.toml
[workspace.dependencies]
libc = "0.2.176"
lance = { version = "=1.1.0-beta.2", path = "./rust/lance" }
lance = { version = "=1.1.0-beta.2", path = "./rust/lance", default-features = false }
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.

Actually I don't think we need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not at my computer right now, but this is the core issue. All crates that use lance inside this workspace will enable the default features of lance.

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.

Can we move this default-features = false to only lance-namespace-impls? Because examples also depend on lance, and should have the default features enabled so people can try the example in cloud

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.

I added a patch to make examples still have all features, let me know if this looks good

@jackye1995 jackye1995 merged commit 63d7b8d into lance-format:main Dec 5, 2025
25 of 26 checks passed
jackye1995 added a commit to jackye1995/lance that referenced this pull request Dec 5, 2025
Part of lancedb/lancedb#2771, continuing
lancedb/lancedb#2568.
`lance-namespace-impls` uses `lance` which pulled in default features
(aws,gcp,azure,oss), which pulled `aws-*` crates into `lancedb` even
when `lancedb` was used with `default-features = false`.

I don't have tests at hand, but it would probably be good to run `cargo
tree -p lance -e no-build -e no-dev --no-default-features -i aws-config`
in CI (maybe for each crate?) to avoid adding any dependency back by
default in a future PR.

---------

Co-authored-by: Jack Ye <yezhaoqin@gmail.com>
jackye1995 added a commit that referenced this pull request Dec 5, 2025
Part of lancedb/lancedb#2771, continuing
lancedb/lancedb#2568.
`lance-namespace-impls` uses `lance` which pulled in default features
(aws,gcp,azure,oss), which pulled `aws-*` crates into `lancedb` even
when `lancedb` was used with `default-features = false`.

I don't have tests at hand, but it would probably be good to run `cargo
tree -p lance -e no-build -e no-dev --no-default-features -i aws-config`
in CI (maybe for each crate?) to avoid adding any dependency back by
default in a future PR.

---------

Co-authored-by: Jack Ye <yezhaoqin@gmail.com>
jackye1995 added a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
Part of lancedb/lancedb#2771, continuing
lancedb/lancedb#2568.
`lance-namespace-impls` uses `lance` which pulled in default features
(aws,gcp,azure,oss), which pulled `aws-*` crates into `lancedb` even
when `lancedb` was used with `default-features = false`.


I don't have tests at hand, but it would probably be good to run `cargo
tree -p lance -e no-build -e no-dev --no-default-features -i aws-config`
in CI (maybe for each crate?) to avoid adding any dependency back by
default in a future PR.

---------

Co-authored-by: Jack Ye <yezhaoqin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants