Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown library collection error when importing custom package (VSCode) #565

Open
stwupton opened this issue Jan 5, 2025 · 2 comments
Open

Comments

@stwupton
Copy link

stwupton commented Jan 5, 2025

In vscode, I'm getting this error Syntax Error: Unknown library collection: 'jetpack_joyride' when attempting to import a custom package.

image

The project does compile and run successfully with the following command:
odin build ./src -debug -out:./build/jetpack-joyride.exe -collection:jetpack_joyride=collections/jetpack_joyride

ols.json:

{
    "$schema": "https://raw.githubusercontent.com/DanielGavin/ols/master/misc/ols.schema.json",
    "collections": [
        { 
            "name": "jetpack_joyride", 
            "path": "collections/jetpack_joyride" 
        }
    ],
    "enable_document_symbols": true,
    "enable_hover": true,
    "enable_snippets": true
}

File structure:

image

@stwupton
Copy link
Author

stwupton commented Jan 5, 2025

I have just discovered that it works correctly when I move the folder containing my Odin project to the top of the VSCode workspace.

image

@DanielGavin
Copy link
Owner

DanielGavin commented Jan 5, 2025

Makes sense.

It currently doesn't support multiple workspaces. So it just picks the first one.

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

No branches or pull requests

2 participants