Update liblouis to version 3.8, add debug logging functionality and cleanup old workarounds that are no longer necessary#9015
Conversation
…uis can be identified as such
|
there is also some major improvements to the arabic grade1 table which are not mentioned in the release notes, including more compatibility with the unified Arabic braille code, fixing many problems regarding back-translation, and improving the overall readability of the table. i wish we see this Merged in NVDA as soon as possible> |
|
This won't be in NVDA 2018.4, but 2019.1 should work. Usually we don't mention fixes or improvements in liblouis in the NVDA what's new. |
|
@LeonarddeR Thanks to leonardder's mood work liblouis3.8 This version of Chinese Braille also has a lot of modifications. I hope you can see him in the next alpha test build and test thank@ |
|
I updated the initial description of this pr, as I've been able to expand it in a major way. |
| # Set the log level to all. | ||
| # The NVDA logging callback will filter messages appropriately, | ||
| # i.e. error messages will be logged at the error level. | ||
| louis.setLogLevel(louis.LOG_ALL) |
There was a problem hiding this comment.
Are you sure there is not a performance decrease with this? If there are a lot of log calls in Liblouis at level debug, there will be many switches from c to Python, even if the log callback Python function returns early. I certainly agree we should enable for warning and error though.
There was a problem hiding this comment.
I haven't experienced any noticeable performance quirks. I guess we can do either of 4 things:
- Leave as is
- Initialize liblouis debug at louis level DEBUG, in which case the number of message drops significantly (i.e. as far as I know, all messages involved with a translation that succeeds, are logged below level debug and thus won't be logged in that case.
- Do not initialize louis logging at all when the louis flag in the configuration is False. This requires a restart of NVDA for changes to the louis flag to take effect.
- Revert the config spec change. Instead, initialize louis logging at level_none, in which case nothing is logged at all. However... that only adds the possibility to change the logging level at runtime.
There was a problem hiding this comment.
Good to know you're not feeling any performance decrease. I'd still vote for going with option 2. Assuming there is no good reason why those messages below debug need to be easily accessed on any copy of NVDA.
|
Cool! I think setting the liblouis log level to off when louisHelper terminates is not strictly necessary, but presumably it doesn't hurt either. |
|
I don't think it's strictly necessary either, but better safe than sorry. There's nothing as scary as log output pumped to a callback function which python object died or something.
|
|
Is this PR already fully included into NVDA 2018.4? I ask because the changelog file wasn't updated. |
|
It is included in 2019.1. It was just added to the wrong milestone. |
Link to issue number:
Closes #9013
Closes #4435
Closes #4554
Description of this pull request
The log output can be enabled by setting config.conf['debugLog']['louis'] to True. While @jcsteh suggested in Send liblouis log output to the NVDA log #4554 (comment) to throw everything in at level debug, I think I've been able to come up with a sane mapping of louis levels to NVDA levels.
Testing performed:
Unit tests, chose the new tables from the braille settings panel.
Known issues with pull request:
Change log entry:
New features
Changes
Changes for developers