-
Notifications
You must be signed in to change notification settings - Fork 65
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
Overhaul Unicode preferences #1586
Conversation
e7e0a8d
to
69f8cab
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1586 +/- ##
==========================================
- Coverage 87.17% 87.14% -0.04%
==========================================
Files 115 115
Lines 29565 29577 +12
==========================================
+ Hits 25773 25774 +1
- Misses 3792 3803 +11 ☔ View full report in Codecov by Sentry. |
This now contains the sketch by @fingolfin in #1588 as well with one difference: |
No clue (neither what the problem nor what the proposed solution is). Does that address your concerns @benlorenz? |
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.
Some optional suggestions added
previous = ALLOW_UNICODE_OVERRIDE_VALUE | ||
ALLOW_UNICODE_OVERRIDE_VALUE = flag | ||
try | ||
f() |
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.
Seems we have no tests for with_unicode
in AA` :-(. But of course this is out of scope for this PR.
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.
That's true. But after thinking again about it, this seems to be kind of hard anyway:
Calling allow_unicode()
from the test would change the user preferences while running tests (not a great experience for devs), and from a within with_unicode
block allow_unicode
is unsafe.
But overall, we should postpone it
All of this is non-breaking and can thus be merged, right? |
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.
I would also prefer to have this as a const Ref
, this should work with all supported julia versions. I think this avoids some performance penalty in the compiler since it can generate more specific code and it also avoids having to specify the global
every time. I added suggestions for the remaining code.
Otherwise I think this should work for the Oscar tests.
6bc24cd
to
f2228bc
Compare
To be able to disable unicode for tests/doctests etc., see e.g. oscar-system/Oscar.jl#3271
Resolves #1588.