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

Migrate to `tempfile` from deprecated `temdir` #870

Merged
merged 1 commit into from Nov 15, 2019
Merged

Conversation

@silwol
Copy link

silwol commented Nov 15, 2019

The tempdir crate was deprecated by its authors, and tempfile is
recommended as a replacement.

I assume this is the first time that a dependency needs to be removed
from Cargo.toml files, because I found no functionality to remove the
entry. I created an unset function analogous to the set_string
function found in the cargo_toml.rs file.

Rationale: I do packaging work for rust crates in Debian, and due to
it's deprecation, we decided to not package the tempdir crate at all,
but to submit patches to the projects that still use it instead.

src/codegen/sys/cargo_toml.rs Outdated Show resolved Hide resolved
The `tempdir` crate was deprecated by its authors, and `tempfile` is
recommended as a replacement.

I assume this is the first time that a dependency needs to be removed
from `Cargo.toml` files, because I found no functionality to remove the
entry. I created an `unset` function analogous to the `set_string`
function found in the `cargo_toml.rs` file.

Rationale: I do packaging work for rust crates in Debian, and due to
it's deprecation, we decided to not package the `tempdir` crate at all,
but to submit patches to the projects that still use it instead.
@silwol silwol force-pushed the silwol:master branch from a8f6d4a to 18121cf Nov 15, 2019
@silwol

This comment has been minimized.

Copy link
Author

silwol commented Nov 15, 2019

You're right. I had simply taken the set_value function as a basis without considering the fact that remove takes the key by ref in contrast to insert.

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Nov 15, 2019

@silwol Thanks. If @GuillaumeGomez and @sdroege is not against this change I will merge it today and add PR to sys

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Nov 15, 2019

@silwol Thanks. If @GuillaumeGomez and @sdroege is not against this change I will merge it today and add PR to sys

looks good to me

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Nov 15, 2019

Shouldn't there be changes in the Cargo.lock file as well?

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Nov 15, 2019

@GuillaumeGomez IMHO not, as we don't add lock file to git in sys crates

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Nov 15, 2019

Ah indeed, my bad! I thought the change was done on the gir's Cargo.lock file. Then all good for me!

@EPashkin EPashkin merged commit 1ee9edf into gtk-rs:master Nov 15, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.