Skip to content

Conversation

@FourteenBrush
Copy link
Contributor

@FourteenBrush FourteenBrush commented Dec 30, 2025

On ols version dev-2025-12-30-16cd61e-debug with odin version dev-2025-12:c46e65809, I am getting error logs because ols seems to pass a -collection:shared=... flag:

Failed to unmarshal check results: Invalid_Data, Library collection 'shared' path must be a directory, got '/usr/local/bin/shared'

The full odin invocation is:

odin check "/home/username/project/dir" -collection:shared="/usr/local/bin/shared" <checker_opts>  
 -json-errors 2>&1

I only seem to have this problem on the zed editor.

Also not entirely sure why this shared collection path is relative to the ols executable (basedir <ols path> / shared) (as per common.config.collections):

for k, v in common.config.collections {

@FourteenBrush
Copy link
Contributor Author

Actually seems to be a zed specific issue, as I did some further research, and it seems like zed passes a RequestInitializeParams.initializationOptions which contains collections, while nvim, vscode, among others pass an empty list for collections:

	collections = [
		OlsConfigCollection{
			name = "core",
			path = "/usr/local/bin/core",
		},
		OlsConfigCollection{
			name = "shared",
			path = "/usr/local/bin/shared",
		},
		OlsConfigCollection{
			name = "vendor",
			path = "/usr/local/bin/vendor",
		},

This causes tabcompletion for the core, vendor and shared collections not to work.
I'll take a look at whats's wrong on the zed-extensions/odin side

@FourteenBrush
Copy link
Contributor Author

Zed issue has been fixed on version v0.3.9 of the extension, seems like overriding the shared collection is actually permitted, which can not be said about core, vendor and base, I'll close this now then.

zed-extensions/odin@3176fc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant