You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide a clear and concise description of the bug along with logs
What are the steps to reproduce this issue?
Start command "MicroPico:Extra > Switch stubs"
In "Select the stubs port you want to use" menu, choose an arbitrary port other than "Included"
In "Select the stubs version you want to use" menu, choose an arbitrary version
What happens?
What were you expecting to happen?
For example, if we select port ESP32 version 1.23.0.post1, the following error dialog will appear.
Similar results are obtained for the other combinations.
Any logs, error output, etc?
(To get extension logs see Terminal > Output > Extension Host and copy output concerning pico-w-go or micropico) (If it’s long, please paste to https://gist.github.com and insert the link here)
024-06-21 23:53:04.043 [error] Error: Command failed: "/Users/takuo/.pyenv/shims/pip3" install 1.23.0.post1==undefined --target "/Users/takuo/.micropico-stubs/1.23.0.post1==undefined" --no-user
ERROR: Could not find a version that satisfies the requirement 1.23.0.post1==undefined (from versions: none)
ERROR: No matching distribution found for 1.23.0.post1==undefined
at checkExecSyncError (node:child_process:928:11)
at Object.execSync (node:child_process:1000:15)
at Object.execSync (node:electron/js2c/node_init:2:13035)
at installStubsByVersion (/Users/takuo/local/src/MicroPico/src/stubs.mts:336:18)
at /Users/takuo/local/src/MicroPico/src/activator.mts:1156:30 micropico.extra.switchStubs {"value":"paulober.pico-w-go","_lower":"paulober.pico-w-go"}
Any other comments?
Perhaps the cause is that in the following code (activator.mts, lines 1121-1130), the value of Object.keys( availableStubVersions).length is always 1 because the type of availableStubVersions is {[key: string]: string[]}.
Object.entries(availableStubVersions).forEach(([key,values])=>{// Map each value to "key - value" and push to resultArrayversions.push(
...values.map(value=>Object.keys(availableStubVersions).length>1
? `${stubPortToDisplayString(key)} - ${value}`
: value));});
This causes versions to be just a list of version number strings, and in the following code (activator.mts, line 1152), versionParts is set to a different value than expected.
constversionParts=version.split(" - ");
The above code can be changed as follows to achieve the expected behavior.
Object.entries(availableStubVersions).forEach(([key,values])=>{// Map each value to "key - value" and push to resultArrayversions.push(
...values.map(value=>`${stubPortToDisplayString(key)} - ${value}`));});
Which version of MicroPico are you using?
3.7.8
Support info
Copy this from the Help -> Info/About -> Copy (Code -> About Visual Studio Code -> Copy on macOS) option in Visual Studio Code:
@wtakuo Thanks for taking the time to report this bug in this very detailed issue and providing a PR to fix it ASAP.
I'm sorry that you had this bug, it should have definitely get caught during testing.
I'll include your fix in the next patch which will be released today.
paulober
added a commit
to wtakuo/MicroPico
that referenced
this issue
Jun 22, 2024
What are the steps to reproduce this issue?
What happens?
What were you expecting to happen?
For example, if we select port ESP32 version 1.23.0.post1, the following error dialog will appear.
Similar results are obtained for the other combinations.
Any logs, error output, etc?
(To get extension logs see Terminal > Output > Extension Host and copy output concerning pico-w-go or micropico)
(If it’s long, please paste to https://gist.github.com and insert the link here)
Any other comments?
Perhaps the cause is that in the following code (
activator.mts
, lines 1121-1130), the value ofObject.keys( availableStubVersions).length
is always 1 because the type ofavailableStubVersions
is{[key: string]: string[]}
.This causes
versions
to be just a list of version number strings, and in the following code (activator.mts
, line 1152),versionParts
is set to a different value than expected.The above code can be changed as follows to achieve the expected behavior.
Which version of MicroPico are you using?
3.7.8
Support info
Copy this from the
Help -> Info/About -> Copy
(Code -> About Visual Studio Code -> Copy
on macOS) option in Visual Studio Code:The text was updated successfully, but these errors were encountered: