-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Describe the bug
In IntelliJ we regularly see an error alert 'unable to load glossary file'
To Reproduce
Open a workspace with a glossary file and see contextive working normally.
Work in the workspace changing files etc. and randomly see 'unable to load glossary file'
Expected behavior
Should not show 'unable to load glossary file' when the glossary file was actually loaded.
Additional context
Reviewing the lsp logs from intellij, it seems that intellij is regularly sending 'didChangeWatchedFile' notifications for folders that contain code files that are being edited, even though that is not what was registered:
2025-10-01 09:10:47.371 IN {"jsonrpc":"2.0","id":2,"method":"client/registerCapability","params":{"registrations":[{"id":"c3c7a06c-51e0-4ad3-99d1-eb8c4d1576c7","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.glossary.yml","kind":3},{"globPattern":"**/*.glossary.yaml","kind":3}]}}]}}
...
2025-10-01 09:10:47.442 IN {"jsonrpc":"2.0","id":4,"method":"client/registerCapability","params":{"registrations":[{"id":"8634507a-c618-4f68-8625-8b31f9fce161","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"/Users/chris/Documents/DevCycles/Talks/TddDddDemo/tdd-ddd-demo-java/.contextive/definitions.yml","kind":3}]}}]}}
...
2025-10-01 11:20:23.586 OUT {"jsonrpc":"2.0","method":"workspace/didChangeWatchedFiles","params":{"changes":[{"uri":"file:///Users/chris/Documents/DevCycles/Talks/TddDddDemo/tdd-ddd-demo-java/target/classes/au/chrissimon/universityapi/Students","type":1}]}}
Need to log a bug with intelliJ and investigate workarounds on our end - perhaps just switch the log to 'info' and not 'warn' when unable to find a file, especially if it is not the configured file, because we should always find a file found through 'didchangewatchedfile' unless it is being misreported.