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

Project creation fails with stable Torizon IDE Extension #299

Open
MiKom opened this issue Feb 26, 2025 · 6 comments
Open

Project creation fails with stable Torizon IDE Extension #299

MiKom opened this issue Feb 26, 2025 · 6 comments

Comments

@MiKom
Copy link

MiKom commented Feb 26, 2025

Steps to reproduce

  1. Install stable Torizon IDE Extension
  2. Try creating a project

Expected result

Project is created

Actual result

Project creation fails. This repo seems to have moved from powershell scripts to xsh scripts but the stable VSCode extension (2.8.1) still calls powershell script:

async function createFromProjectTemplate(templateFolder, appName, containerName, location, telemetry = true) {
    return await new Promise((resolve) => {
        // eslint-disable-next-line max-len
        const msg = `Creating application ${appName} based on template ${templateFolder}`;
        ExtensionUtils_1.ExtensionUtils.showStatusBarLoading(msg);
        ExtensionUtils_1.ExtensionUtils.writeln(msg);
        void ExtensionUtils_1.ExtensionUtils.runOnTerminal(
        // eslint-disable-next-line max-len
        `pwsh ${process.env.HOME}/.apollox/scripts/createFromTemplate.ps1 ${process.env.HOME}/.apollox/${templateFolder} ${appName} ${containerName} ${location.toString()} "${templateFolder}" "true" "${telemetry.toString()}"`).then(ret => {
            if (ret) {
                ExtensionUtils_1.ExtensionUtils.writeln("Project created OK");
                ExtensionUtils_1.ExtensionUtils.hideStatusBarLoading();
                resolve(true);
            }
            else {
                ExtensionUtils_1.ExtensionUtils.showError("Error trying to create project");
                ExtensionUtils_1.ExtensionUtils.hideStatusBarLoading();
                resolve(false);
            }
        });
    });
}

The stable extension should either check out the scripts in a version that still contains the pwsh files or you should release the preview version of the extension.

Stable extension and templates repository got desynced.

@microhobby
Copy link
Collaborator

Hi, @MiKom this should not happen, only if you explicitly set it differently on the global settings.json. Could you please check and share the content of your settings?

@microhobby
Copy link
Collaborator

microhobby commented Feb 26, 2025

@MiKom as reference: https://developer.toradex.com/torizon/application-development/ide-extension/reference-documentation/using-templates-development-branch

These are the default for dev, but for stable the defaults are:

  "torizon.templateRepo": "https://github.com/torizon/vscode-torizon-templates.git",
  "torizon.templatesBranch": "bookworm",
  "torizon.templatesTag": "v2.8.1",

@MiKom
Copy link
Author

MiKom commented Feb 26, 2025

Hmm. I'm working in WSL. May this be caused by interplay of versions between the extension on the host Windows VSCode vs the extension version inside the WSL Torizon distro?

Anyways, I somehow ended with different version of the extension on Windows VSCode (2.8.112) and on Torizon distro (2.8.1). Even now, when I uninstalled the extension both on windows and on WSL, VSCode offers me 2.8.112 on Windows and 2.8.1 on WSL. And I don't seem to have any settings to blanket allow preview extension versions anywhere.

Is it possible that marketplace metadata somehow differs for Windows and Linux vscode? Offering newer version on windows?

@AsNalage
Copy link

Is there a work around to create project until this issue is fixed?

@MiKom
Copy link
Author

MiKom commented Feb 26, 2025

I wiped ~/.apollox completely on the Torizon WSL vm and re-installed the 2.8.112 version on both windows and WSL. Also look at ~/.vscode-server/data/Machine/settings.json` if you have these settings that @microhobby mentioned and clear them.

@microhobby
Copy link
Collaborator

Hmm. I'm working in WSL. May this be caused by interplay of versions between the extension on the host Windows VSCode vs the extension version inside the WSL Torizon distro?

Yes, if you are using the Windows Wizard, I think that this scenario is possible, because the Windows wizard is experimental yet, so it always get the pre-release version.

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

3 participants