Skip to content

fix(postgres): remove home crate in favor of std::env::home_dir#4171

Open
ricochet wants to merge 1 commit intolaunchbadge:mainfrom
ricochet:home-to-std
Open

fix(postgres): remove home crate in favor of std::env::home_dir#4171
ricochet wants to merge 1 commit intolaunchbadge:mainfrom
ricochet:home-to-std

Conversation

@ricochet
Copy link

home_dir() was fixed in Rust 1.85 (rust-lang/rust#132515) and
un-deprecated in 1.87 (rust-lang/rust#137327). Since our MSRV is 1.86, the function is correct but still carries a deprecation warning until MSRV is bumped to 1.87.

This will allow other targets to compile including WebAssembly, see rust-lang/cargo#12297

Does your PR solve an issue?

This is related to #4056 to allow for targeting additional environments. I encountered this when compiling for wasm32-wasip2. The rust ecosystem is moving off of the home crate in favor of std so regardless of desire to support WebAssembly as a target, this will improve portability and maintainability of sqlx.

Is this a breaking change?

No

`home_dir()` was fixed in Rust 1.85 (rust-lang/rust#132515) and
un-deprecated in 1.87 (rust-lang/rust#137327). Since our MSRV is 1.86, the function is correct but still carries a deprecation warning until MSRV is bumped to 1.87.

This will allow other targets to compile including WebAssembly, see rust-lang/cargo#12297
@ricochet
Copy link
Author

CI on main is broken, but once #4172 lands, this can be rebased and should be green.

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.

1 participant

Comments