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
Confusing project budgets #27580
Labels
area: devkit/build-angular
freq1: low
Only reported by a handful of users who observe it rarely
severity1: confusing
type: bug/fix
Comments
alan-agius4
added
type: bug/fix
freq1: low
Only reported by a handful of users who observe it rarely
area: devkit/build-angular
severity1: confusing
labels
May 2, 2024
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
May 6, 2024
Ensure that file sizes are consistently formatted using decimal byte units, adhering to the International System of Units (SI) convention. This aligns with clarity and standardization across the project. - Kilobyte (kB): 10^3 bytes (1000 bytes) - Megabyte (MB): 10^6 bytes (1,000,000 bytes) - Gigabyte (GB): 10^9 bytes (1,000,000,000 bytes) Closes: angular#27580
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
May 6, 2024
Ensure that file sizes are consistently formatted using decimal byte units, adhering to the International System of Units (SI) convention. This aligns with clarity and standardization across the project. - Kilobyte (kB): 10^3 bytes (1000 bytes) - Megabyte (MB): 10^6 bytes (1,000,000 bytes) - Gigabyte (GB): 10^9 bytes (1,000,000,000 bytes) Closes: angular#27580
alan-agius4
added a commit
that referenced
this issue
May 6, 2024
Ensure that file sizes are consistently formatted using decimal byte units, adhering to the International System of Units (SI) convention. This aligns with clarity and standardization across the project. - Kilobyte (kB): 10^3 bytes (1000 bytes) - Megabyte (MB): 10^6 bytes (1,000,000 bytes) - Gigabyte (GB): 10^9 bytes (1,000,000,000 bytes) Closes: #27580
alan-agius4
added a commit
that referenced
this issue
May 6, 2024
Ensure that file sizes are consistently formatted using decimal byte units, adhering to the International System of Units (SI) convention. This aligns with clarity and standardization across the project. - Kilobyte (kB): 10^3 bytes (1000 bytes) - Megabyte (MB): 10^6 bytes (1,000,000 bytes) - Gigabyte (GB): 10^9 bytes (1,000,000,000 bytes) Closes: #27580 (cherry picked from commit 9e13a8b)
Thanks for fixing this so quickly! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: devkit/build-angular
freq1: low
Only reported by a handful of users who observe it rarely
severity1: confusing
type: bug/fix
Command
build
Is this a regression?
I don't think so.
Description
When generating a new project, budgets are automatically assigned, however the generated values are really confusing. I accidentally ran into some of these limits. I had to grab a calculator, the build output, make some assumptions, run some calculations, before I could actually understand what these options meant.
It would be nice if these were unambiguous.
The generated project limits rules-as-written are:
First of all, let's assume that the the
m
inmb
should beM
, that's a factor 10⁹ difference, but ¹/₁₀₀₀ bits makes no sense here, since we're talking about real storage here. I've only ever used millibits in calculations on pure information.I analysed this output:
This quickly points in the direction that the
b
should be aB
, it's bytes, not bits.Finally if I run some calculations on this, it clears up another thing (but the output is faulty here too).
(500 + 589)×10³ ≠ 1.06 × 10⁶ (rules-as-written ISO prefixes)
(500 + 589)×2¹⁰ ≠ 1.06 × 10³ × 2¹⁰ (floppy disk megabytes)
(500 + 589)×2¹⁰ = 1.06 × 10²⁰ (actually intended ISO/IEC 80000-13 binary prefix standard)
From this I can conclude that the numbers used in calculations are actually using the binary measures according to ISO/IEC 80000 (which is the most common for modern systems AFAIK), and the
k
should beki
and them
should ultimately beMi
.As you can see, it's no trivial matter to understand what the configuration file actually means with these values:
Note that you now suddenly can see that the initial maximum warning is not half of the initial maximum error but is approximately 48.8% of the maximum error.
While not a big priority, as it is unlikely to cause problems whose solution isn't obvious (increase the limits), it is annoying as it can unexpectedly cause errors whose exact cause is hard to understand.
Minimal Reproduction
ng g new app
Check
angular.json
» project » app » architect » build » configuration » production » budgetsException or Error
No response
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: