Closed pappasam closed 9 months ago
@pappasam are there any direct tests that the initialisation options are being interpreted correctly?
Related -- what's the expected behaviour if there are additional keys which aren't known to the initialisation options parser?
My testing locally (so far only with test_eager_lsp_completion
) suggests that the issue is that the camel casing handling isn't working and that the server is always running with the defaults.
Related -- what's the expected behaviour if there are additional keys which aren't known to the initialisation options parser?
Looks like Pydantic and cattrs both silently allow extra unknown fields by default:
forbid_extra_keys=False
)This seems likely to mask configuration errors to me. Ideally I guess there'd be a way to capture these, log them, but still consume what other config the user passed? (for compatibility with the current behaviour)
Ok, I think I have a fix for this. #282 adds testing and I'm ~working on fixing~ have fixed the issues found by those tests in #283.
Note: tests for completion are now failing in a way that is slightly confusing to me. Will try looking into this later, but am open to suggestions from others (including @PeterJCLaw ) in case the reason is more obvious to others!