Attempt to load key warnings after updating to 2.1.0
After updating to 2.1.0 from 2.0.2 the generate*DbInterface tasks are logging the following warnings:
WARN: Attempt to load key 'ide.hide.excluded.files' for not yet loaded registry
WARN: Attempt to load key 'psi.sleep.in.validity.check' for not yet loaded registry
WARN: Attempt to load key 'psi.incremental.reparse.depth.limit' for not yet loaded registry
Oh yes, been noticing those for a while in the SNAPSHOT versions, didn't realize it was SQLDelight.
What are the consequences of these obviously failed loading attempts?
There are no consequences.
OK, but it'd still be nice if they could be avoided.
📜 It was originally a problem way back in 2020 https://github.com/sqldelight/sqldelight/issues/1792
A null logger was added to suppress the warnings https://github.com/sqldelight/sql-psi/pull/213
Last year, the null logger was removed as caused another issue https://github.com/sqldelight/sql-psi/pull/623
The warnings appear since dependencies were updated
A possible solution is the warnings are not created if keys are set using System properties https://github.com/JetBrains/intellij-community/blob/c7784be4fb616bf2bdffda631c4e89e82950e04c/platform/util/src/com/intellij/openapi/util/registry/RegistryValue.kt#L220 as it early returns avoiding the log warning 🤔