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

Switch from dirs crate to cargo-team maintained home crate #78

Closed
wants to merge 1 commit into from

Conversation

oherrala
Copy link

@oherrala oherrala commented Sep 4, 2023

This change is motivated by a new dependency in dirs-sys-rs crate (see dirs-dev/dirs-sys-rs@e169da7) and subsequent issues (see dirs-dev/dirs-sys-rs#21, dirs-dev/dirs-sys-rs#23 and dirs-dev/dirs-rs#51) where author of dirs crate included new small crate option-ext which is licensed with MPL license. MPL can be problematic to users.

This pull requests switches from dirs crate to home crate. home crate is maintained by the cargo team and is licensed with "MIT OR Apache-2.0" licenses including the one dependency.

@oherrala oherrala force-pushed the from-dirs-to-home branch 2 times, most recently from d2f7dc1 to 76f6a0f Compare September 4, 2023 07:25
@djc
Copy link

djc commented Sep 4, 2023

FWIW, I'm in favor of using the home crate instead of dirs because it's used in several other crates already.

@oherrala
Copy link
Author

oherrala commented Sep 4, 2023

Apparently home crate doesn't support wasm (see rust-lang/cargo#12297) and cargo team wants to keep it more as an "internal use" (see rust-lang/cargo#12297 (comment)).

So for this use case we might need to either feature gate home for unix/windows or look for alternative crate.

@Xaeroxe
Copy link
Collaborator

Xaeroxe commented Sep 4, 2023

I'm fine with implementing the feature gate. Apologies, I was the one who brought dirs into which. I wasn't aware of this licensing issue.

@Xaeroxe
Copy link
Collaborator

Xaeroxe commented Sep 4, 2023

I've implemented my solution in #80. Thank you for bringing this issue to my attention!

@Xaeroxe Xaeroxe closed this Sep 4, 2023
the-kenny added a commit to the-kenny/pgrx that referenced this pull request Jan 24, 2024
The 'dirs' crate recently started depending on the 'options-ext' crate
which uses copyleft license (MPL). This (unnecessary) dependency causes
licensing issues for various users by possibly poisoning the dependency
tree of their projects[1].

This change replaces the 'dirs' crate with 'home'. The 'home' crate is
maintained by the cargo team and offers the same functionality.

As a bonus, this change also results in a slightly smaller dependency
tree.

[1]:
- artichoke/artichoke#2564
- pyrossh/rust-embed#231
- juhaku/utoipa#834
- harryfei/which-rs#78
the-kenny added a commit to the-kenny/pgrx that referenced this pull request Jan 24, 2024
The `dirs` crate recently started depending on the `options-ext` crate
which uses copyleft license (MPL). This (unnecessary) dependency causes
licensing issues for various users by possibly poisoning the dependency
tree of their projects[1].

This change replaces the `dirs` crate with `home`. The `home` crate is
maintained by the cargo team and offers the same functionality.

As a bonus, this change also results in a slightly smaller dependency
tree.

[1]:
- artichoke/artichoke#2564
- pyrossh/rust-embed#231
- juhaku/utoipa#834
- harryfei/which-rs#78
the-kenny added a commit to the-kenny/pgrx that referenced this pull request Apr 20, 2024
The `dirs` crate recently started depending on the `options-ext` crate
which uses copyleft license (MPL). This (unnecessary) dependency causes
licensing issues for various users by possibly poisoning the dependency
tree of their projects[1].

This change replaces the `dirs` crate with `home`. The `home` crate is
maintained by the cargo team and offers the same functionality.

As a bonus, this change also results in a slightly smaller dependency
tree.

[1]:
- artichoke/artichoke#2564
- pyrossh/rust-embed#231
- juhaku/utoipa#834
- harryfei/which-rs#78
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.

3 participants