mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
Running test fails
#256
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @StefMa on GitHub (Dec 20, 2024).
Hey guys,
greetings from Germany. We typically write numbers with
,instead of.🤓✅ 1,20 Euro
❌ 1.20 Euro.
Why is this interesting? Cause right now I get errors when running
Right now these tests are failing:
@odenix commented on GitHub (Dec 20, 2024):
Other things that could be improved about this message: don’t mix present and past tense, don’t use percentage for passed tests and fraction for failed tests. Not sure the assert stats are useful.
@bioball commented on GitHub (Dec 20, 2024):
Hm, that's interesting.
It's probably a good thing that our test report formats numbers that are locale-specific, but our Grade build should nevertheless be consistent.
For now, you should be able to get the tests passing with
LC_ALL=en_US.UTF-8 ./gradlew test.Yeah, I agree, the summary can be polished up a bit. But, the number of assertions is meaningful for some users (CC @jjmaestro).
@jjmaestro commented on GitHub (Dec 20, 2024):
@odenix my rationale when adding this was that the % was a nicer metric for
passbecause you always want that to be100%and knowing the exact number of tests that fail was a good metric forfailsince that's the stuff you need to fix. Likewise forassertssince that also tells you the work that needs doing (fail) and the amount of testing you actually have (e.g. it's not the same having 1 test with 1 assert VS 1 test with a lot of asserts, the second case usually covers more corners so it's nice to know as a metric).Plus, it doesn't hurt just having some summary at the end of the test run, right? :) Most test frameworks report these types of metric!
@odenix commented on GitHub (Dec 20, 2024):
I don't think that English messages should use German number formatting. It would, of course, make sense in German messages.
@StefMa commented on GitHub (Dec 20, 2024):
Honestly I don't know why this happen. My MacBook is set up in English/US, Keyboard is set up to English/US. My IDE is in English/US. I am "only" located in Germany. So I'm also super curious why this even happened.
I am with @odenix here. This is a developer tool, I guess it should stick to english defaults and shouldn't introduce local-specifics.
@bioball commented on GitHub (Dec 23, 2024):
Is the decimal different based on the language being used (as opposed to locale)? I don't have strong opinions here; we can use period decimals consistently if that's the norm.
@odenix commented on GitHub (Dec 23, 2024):
A locale is a combination of language and country/region. By honoring the user's locale but displaying messages in English, we effectively change their locale to an unusual combination of language and country/region, which can be confusing.
It sounds like @StefMa has his locale set to en-US, but apparently his Pkl executable thinks it's en-DE or de-DE.
@bioball commented on GitHub (Dec 23, 2024):
Ah! I didn't realize "locale" was a technical term. My question was, really, does the decimal change based on language and not region?
To answer that: doesn't look like it does. According to LocalePlanet, the decimal for en-DE is
,.But, yeah, I agree that we're mis-formatting numbers here. All of our messages are written in en-US (Pkl currently does not change its messages based on locale), so changing the decimal here is a mistake.
@StefMa commented on GitHub (Dec 24, 2024):
I opened a PR to fix that issue.
The discussion what do display here and in which form can be discussed somewhere else.
I guess it is important to make this stable first.