Skip to content

fix: dx bundle progress output off-by-one in log lines #4014

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

chrivers
Copy link

Before:

...
   1.811s  INFO dx::build::builder: Compiling [270/272]: dioxus
   1.811s  INFO dx::build::builder: Compiling [271/272]: bifrost_api
  25.410s DEBUG dx::build::request: Build completed successfully - output location: "..."
...
  26.94s  INFO dx::build::builder: Copying asset (0/7): ...
  26.95s  INFO dx::build::builder: Copying asset (1/7): ...
...

After:

...
   1.811s  INFO dx::build::builder: Compiling [271/272]: dioxus
   1.811s  INFO dx::build::builder: Compiling [272/272]: bifrost_api
  25.410s DEBUG dx::build::request: Build completed successfully - output location: "..."
...
  26.94s  INFO dx::build::builder: Copying asset (1/7): ...
  26.95s  INFO dx::build::builder: Copying asset (2/7): ...
...

@chrivers chrivers requested a review from a team as a code owner April 19, 2025 09:41
Copy link
Member

@DogeDark DogeDark left a comment

Choose a reason for hiding this comment

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

It looks like the crate count isn't off-by-one, but rather we don't emit the last log. If you want to fix that, I think we need to change:

match artifact.executable {
Some(executable) => output_location = Some(executable.into()),
None => self.status_build_progress(
units_compiled,
crate_count,
artifact.target.name,
),
}

To be something along the lines of:

unites_compiled += 1;
self.status_build_progress(units_compiled, crate_count, artifact.target.name);
output_location = artifact.executable.map(|e| e.into());

The rest looks good!

@chrivers
Copy link
Author

@DogeDark thanks for the hint - fixed, and tested. Indeed, one more unit turns up now.

Also, I changed the text from Compiling to Compiled, since the log lines refer to what is completed, not actually what is in progress.

This makes the log output much less confusing. Previously, if something was taking a long time to compile, the wrong crate was getting the blame!

@chrivers
Copy link
Author

Wow, that's a heavy CI job.. is that normal?

@DogeDark I guess the CI needs to be poked? :)

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.

2 participants