-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update cargo to 2024 edition #842
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
Conversation
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention the unsafe
bit in the PR body since that's slightly unexpected?
std::env::set_var("OPENAI_REQUEST_MAX_RETRIES", "2"); | ||
std::env::set_var("OPENAI_STREAM_MAX_RETRIES", "2"); | ||
// | ||
// NOTE: Starting with the 2024 edition `std::env::set_var` is `unsafe` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a big fan of this change!
@@ -1,7 +1,7 @@ | |||
[package] | |||
name = "codex-cli" | |||
version = { workspace = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outside the scope of this PR, but I guess all of our Cargo.toml
files should have version = { workspace = true }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that'd be a bit cleaner
Also, can you please rebase past #843 and make sure the |
b6cf095
to
6fdb30e
Compare
6fdb30e
to
8d70a56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Do you mind updating the PR body to call out:
- Upgrading to 2024 caused formatting changes (is that accurate)?
- Introduced the use of
unsafe
forsetenv
calls, but those are limited to tests?
Some effects of this change:
set_env
are considered unsafe, since this only happens in tests we wrap them inunsafe
blocks