-
Notifications
You must be signed in to change notification settings - Fork 15
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
fixed: xs-dev doctor shows the current environment of Moddable SDK #205
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moddable SDK 5.3.3 is released without pre-built binaries. "xs-dev setup" requires the prompt, but it doesn't work in spinner working. HipsterBrown#200 Reproduced on mac and linux. This change fixes the prompt.
"xs-dev doctor" or "xs-dev info" displays the current environment setup information. After setup of Moddable SDK, it works on Mac environment but doesn't work on Linux and Windows. example on Mac % xs-dev doctor xs-dev environment info: CLI Version 0.36.2 OS Darwin Arch arm64 Shell /bin/zsh NodeJS Version v20.14.0 (/Users/kitazaki/.nodebrew/current/bin/node) Python Version 3.13.0 (/Users/kitazaki/.espressif/python_env/idf5.3_py3.13_env/bin/python) Moddable SDK Version 5.3.3 (/Users/kitazaki/.local/share/moddable) Supported target devices mac example on Linux $ xs-dev doctor xs-dev environment info: CLI Version 0.36.2 OS Linux Arch x64 Shell /bin/bash NodeJS Version v22.12.0 (/home/ubuntu/.nodebrew/current/bin/node) Python Version 3.10.12 (/usr/bin/python) Moddable SDK Version Not found (/home/ubuntu/.local/share/moddable) Supported target devices None This change fixes the issue. platformDir is build/bin directory of Moddable SDK and defined in xs-dev/build/src/toolbox/setup/moddable.ts platformDir reads DEVICE_ALIAS[OS] which is defined in xs-dev/src/toolbox/prompt/devices.ts Exact directories are mac, lin and win, but definitions are mac, linux and windows.
This reverts commit b56f20d.
"xs-dev doctor" or "xs-dev info" displays the current environment setup information. After setup of Moddable SDK, it works on Mac environment but doesn't work on Linux and Windows. example on Mac % xs-dev doctor xs-dev environment info: CLI Version 0.36.2 OS Darwin Arch arm64 Shell /bin/zsh NodeJS Version v20.14.0 (/Users/kitazaki/.nodebrew/current/bin/node) Python Version 3.13.0 (/Users/kitazaki/.espressif/python_env/idf5.3_py3.13_env/bin/python) Moddable SDK Version 5.3.3 (/Users/kitazaki/.local/share/moddable) Supported target devices mac example on Linux $ xs-dev doctor xs-dev environment info: CLI Version 0.36.2 OS Linux Arch x64 Shell /bin/bash NodeJS Version v22.12.0 (/home/ubuntu/.nodebrew/current/bin/node) Python Version 3.10.12 (/usr/bin/python) Moddable SDK Version Not found (/home/ubuntu/.local/share/moddable) Supported target devices None This change fixes the issue. platformDir is build/bin directory of Moddable SDK and defined in xs-dev/build/src/toolbox/setup/moddable.ts platformDir reads DEVICE_ALIAS[OS] which is defined in xs-dev/src/toolbox/prompt/devices.ts Exact directories are mac, lin and win, but definitions are mac, linux and windows.
This reverts commit da45b46.
"xs-dev doctor" or "xs-dev info" displays the current environment setup information. After setup of Moddable SDK, it works on Mac environment but doesn't work on Linux and Windows. example on Mac % xs-dev doctor xs-dev environment info: CLI Version 0.36.2 OS Darwin Arch arm64 Shell /bin/zsh NodeJS Version v20.14.0 (/Users/kitazaki/.nodebrew/current/bin/node) Python Version 3.13.0 (/Users/kitazaki/.espressif/python_env/idf5.3_py3.13_env/bin/python) Moddable SDK Version 5.3.3 (/Users/kitazaki/.local/share/moddable) Supported target devices mac example on Linux $ xs-dev doctor xs-dev environment info: CLI Version 0.36.2 OS Linux Arch x64 Shell /bin/bash NodeJS Version v22.12.0 (/home/ubuntu/.nodebrew/current/bin/node) Python Version 3.10.12 (/usr/bin/python) Moddable SDK Version Not found (/home/ubuntu/.local/share/moddable) Supported target devices None This change fixes the issue. platformDir is build/bin directory of Moddable SDK and defined in xs-dev/build/src/toolbox/setup/moddable.ts platformDir reads DEVICE_ALIAS[OS] which is defined in xs-dev/src/toolbox/prompt/devices.ts Exact directories are mac, lin and win, but definitions are mac, linux and windows.
HipsterBrown
approved these changes
Jan 3, 2025
@@ -13,7 +13,7 @@ const finishedPromise = promisify(finished) | |||
|
|||
export function moddableExists(): boolean { | |||
const OS = platformType().toLowerCase() as Device | |||
const platformDir = DEVICE_ALIAS[OS] | |||
const platformDir = DEVICE_ALIAS[OS].substr(0,3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice quick fix. 👍
🚀 PR was released in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
"xs-dev doctor" or "xs-dev info" displays the current environment setup information.
After setup of Moddable SDK, it works on Mac environment but doesn't work on Linux and Windows.
example on Mac
% xs-dev doctor
xs-dev environment info:
CLI Version 0.36.2
OS Darwin
Arch arm64
Shell /bin/zsh
NodeJS Version v20.14.0 (/Users/kitazaki/.nodebrew/current/bin/node)
Python Version 3.13.0 (/Users/kitazaki/.espressif/python_env/idf5.3_py3.13_env/bin/python)
Moddable SDK Version 5.3.3 (/Users/kitazaki/.local/share/moddable)
Supported target devices mac
example on Linux
$ xs-dev doctor
xs-dev environment info:
CLI Version 0.36.2
OS Linux
Arch x64
Shell /bin/bash
NodeJS Version v22.12.0 (/home/ubuntu/.nodebrew/current/bin/node)
Python Version 3.10.12 (/usr/bin/python)
Moddable SDK Version Not found (/home/ubuntu/.local/share/moddable)
Supported target devices None
This change fixes the issue.
platformDir is build/bin directory of Moddable SDK and defined in xs-dev/build/src/toolbox/setup/moddable.ts
platformDir reads DEVICE_ALIAS[OS] which is defined in xs-dev/src/toolbox/prompt/devices.ts
Exact directories are mac, lin and win, but definitions are mac, linux and windows.