Hi all,
I’m looking into how to change the MAX SDK on the fly for the vscode extension.
The documentation mentions that the place of the sdk should have a modular.cfg file.
On my system, there’s a few of them:
# Cursor's
/home/dhoogla/.cursor-server/data/User/globalStorage/modular-mojotools.vscode-mojo/magic-data-home/envs/max/share/max/modular.cfg
# VsCode's
/home/dhoogla/.vscode-server/data/User/globalStorage/modular-mojotools.vscode-mojo/magic-data-home/envs/max/share/max/modular.cfg
# Global version from`magic global install max --expose mojo
/home/dhoogla/.modular/envs/max/share/max/modular.cfg
# Others for projects initialized with `magic init my-project --format mojoproject` that have max as a dependency
In Cursor and in Vscode, in the bottom right , next to the language, I can see MAX SDK: MAX SDK (stable) which is 25.2. The vscode and cursor versions are 25.2 when I look into their modular.cfg files so that checks out. The chosen SDK is definitely not my global install because that’s a nightly 25.3.
What I wanted to do, but can’t: invoke Mojo: select the default SDK
in either editor and set the SDK to my global, nightly max and mojo 25.3. The dialog box opens and I point it to the path: /home/dhoogla/.modular/envs/max/share/max/modular.cfg and nothing happens. If I change the path to the parent folder of the modular.cfg file nothing happens either.
The documentation page of the Mojo extension mentions:
Configuration
The extension will attempt to find the path of the Mojo SDK installation using the
MODULAR_HOME
environment variable. IfMODULAR_HOME
is not set within the environment, the path can be explicitly set via themojo.modularHomePath
extension setting.
My $MODULAR_HOME is /home/dhoogla/.modular, but it definitely doesn’t take the SDK from there because that would be 25.3
I’m on WSL Ubuntu 22.04.
How am I doing this wrong?