-
Notifications
You must be signed in to change notification settings - Fork 327
Check NI size after it is built #12996
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
The test is currently failing - size should be Two possible solutions for that:
I personally prefer solution (1). |
In c324144, the check is implemented directly in sbt, during Example of NI build failing due to unexpected size:
Successful build of NI:
|
project/NativeImage.scala
Outdated
) | ||
} | ||
val bytes = generatedBin.attributes.size() | ||
val productionNIBounds = (150, 450) |
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.
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 the maxImageSizeInMb
function should return different value for different OS to allow incremental individual improvements on each platform
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.
Put it in, so the size never regresses (too much) again!
project/NativeImage.scala
Outdated
"Ensure that the dependency on `buildNativeImage` is properly set." | ||
) | ||
} | ||
val bytes = generatedBin.attributes.size() |
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.
- the constant should be more prominent
def GraalVM.EnsoLauncher.maxImageSizeInMb = 450
maybe?- it shouldn't be hidden here
project/NativeImage.scala
Outdated
) | ||
} | ||
val bytes = generatedBin.attributes.size() | ||
val productionNIBounds = (150, 450) |
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 the maxImageSizeInMb
function should return different value for different OS to allow incremental individual improvements on each platform
With ee07a3c, the expected sizes of the native image are defined in Lines 99 to 106 in ee07a3c
|
As of May 10, 2025 the sizes are: Linux 404MB, MacOSX Arm 392MB, MacOSX Intel 377MB, Windows 390MB |
Pull Request Description
Size of the generated
enso
NI executable is checked right after it was built. The size bounds for the production NI are set to150 MB <= x <= 450 MB
, explained in #12996 (comment).Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.