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

WIP/DNM: Use 2024 edition #1130

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

jeckersb
Copy link
Contributor

We don't actually want to do this right now, but there wasn't much to it so I'll just post it for future-us when we actually do migrate

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
@github-actions github-actions bot added area/install Issues related to `bootc install` area/system-reinstall-bootc Issues related to system-reinstall-botoc labels Feb 20, 2025
@@ -229,7 +229,8 @@ match-architectures = ["x86_64", "aarch64"]
.to_string();
let parsed_kargs = parse_kargs_toml(&file_content, sys_arch).unwrap();
assert_eq!(parsed_kargs, ["console=tty0", "nosmt"]);
std::env::set_var("ARCH", "aarch64");
// TODO: Audit that the environment access only happens in single-threaded code.
Copy link
Collaborator

Choose a reason for hiding this comment

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

It definitely doesn't, rust runs unit tests in multiple threads by default. We need to stop setting this environment variable in the tests at all. At a quick look it's not clear we need this line of code, shouldn't we be just doing let sys_arch = "aarch64"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it doesn't even reference the environment variable anywhere. No idea what that was ever about. I'll go open a separate PR against main to fix just that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it doesn't even reference the environment variable anywhere. No idea what that was ever about. I'll go open a separate PR against main to fix just that.

#1132

lib/src/cli.rs Outdated
@@ -1012,7 +1013,7 @@ impl Opt {
I::Item: Into<OsString> + Clone,
{
let mut args = args.into_iter();
let first = if let Some(first) = args.next() {
let first = match args.next() { Some(first) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here and I think all the other changes this is cargo fix being conservative with the drop ordering change. IMO if let is easier to read than match and so we should not apply these changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -136,35 +136,35 @@ struct Generation {
dirmeta_found: BTreeSet<RcStr>,
}

fn push_dirmeta(repo: &ostree::Repo, gen: &mut Generation, checksum: &str) -> Result<()> {
if gen.dirtree_found.contains(checksum) {
fn push_dirmeta(repo: &ostree::Repo, r#gen: &mut Generation, checksum: &str) -> Result<()> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine as an automated fix, but I think it'd be nicer to rename this to generation instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

100%, I did exactly that manually before I realized that cargo fix would do its own thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install Issues related to `bootc install` area/system-reinstall-bootc Issues related to system-reinstall-botoc do-not-merge/work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants