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

Enhance: Enable usage of white spaces in project's path #943

Closed
wants to merge 52 commits into from

Conversation

radurentea
Copy link
Collaborator

@radurentea radurentea commented Apr 18, 2023

Description

Enable usage of white spaces in project's path.
https://jira.espressif.com:8443/browse/VSC-808

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Steps to test this pull request

Provide a list of steps to test changes in this PR and required output

  1. Make sure all the above have whitespaces in their paths:
  • ESP-IDF folder
  • ESP-IDF Tools folder
  • Your project

Note: For ESP-IDF folder and ESP-IDF Tools folder it means you will need to make a new installation for them.

  1. Create a project that has a white space in it. Ex: "My Project"
  2. Build, Flash, Monitor it.

Note: Needs to be tested for all variations of: flashtype method (dfu, jtag, uart), Default Terminal in VsCode:
Windows: Command Prompt and Powershell
Mac: zsh/bash
Linux: bash
(open command palette in VS Code [CTRL + SHIFT +P] and use the command: Terminal: Select Default Profile

  1. There should be no output error regarding the paths. Such as 'invalid path' or 'invalid argument' etc.
  • Expected behaviour:
    With these changes, user should be able to use the VsCode extension and it's features on projects that have white spaces in their path or in the ESP-IDF and ESP-IDF Tools installation paths

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Tested building, flashing and monitoring on all variations of Terminals (Windows: Powershell, Mac: zsh/bash, Linux: bash) and flashing methods (DFU, JTAG, UART).

Test Configuration:

  • ESP-IDF Version: 5.1
  • OS (Windows,Linux and macOS): Windows, Linux, macOS

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

@radurentea radurentea self-assigned this Apr 18, 2023
@github-actions
Copy link

github-actions bot commented Apr 18, 2023

Download the artifacts for this pull request:

src/flash/jtagCmd.ts Fixed Show fixed Hide fixed
@github-actions
Copy link

github-actions bot commented May 6, 2023

Pull request has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label May 6, 2023
@github-actions github-actions bot closed this May 11, 2023
@radurentea radurentea reopened this May 11, 2023
@radurentea radurentea removed the stale Stale PR or Issue label May 11, 2023
@radurentea
Copy link
Collaborator Author

Hi @AndriiFilippov ,

Can you re-test again for both of the issues you've found previously?

@AndriiFilippov
Copy link
Collaborator

@radurentea

Also whenever I create project with spaces I do have this messages in console:

[proc] Executing command: cmake --version
[proc] The command: cmake --version failed with error: Error: spawn cmake ENOENT
[proc] Executing command: cmake -E capabilities
[proc] The command: cmake -E capabilities failed with error: Error: spawn cmake ENOENT
[variant] Loaded new set of variants
[kit] Successfully loaded 1 kits from C:\Users\AndriiFilippov\AppData\Local\CMakeTools\cmake-tools-kits.json
[main] Configuring project: project is name 
[main] Configuring project: project is name

Do you know what is it ?

@radurentea , This one still persist, but I think we can create separate ticket for this one ? what do you think ?

Tested on Linux as well, everything works fine, but on the Extension Configuration finish page I do see this info message:
image

But, this command does not work with spaces in the PATH :
image

I think we should do something with this one.

@radurentea
Copy link
Collaborator Author

@AndriiFilippov
Made the modifications for the linux command. You can re-test it.

Regarding this one:

[proc] Executing command: cmake --version
[proc] The command: cmake --version failed with error: Error: spawn cmake ENOENT
[proc] Executing command: cmake -E capabilities
[proc] The command: cmake -E capabilities failed with error: Error: spawn cmake ENOENT
[variant] Loaded new set of variants
[kit] Successfully loaded 1 kits from C:\Users\AndriiFilippov\AppData\Local\CMakeTools\cmake-tools-kits.json
[main] Configuring project: project is name 
[main] Configuring project: project is name

it doesn't seem to be an issue with current PR, I was not able to reproduce it.

@AndriiFilippov
Copy link
Collaborator

AndriiFilippov commented Sep 1, 2023

@radurentea
Screenshot 2023-09-01 at 10 09 09

Also can't build on MacOS.
Please, check

*  Executing task: cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -B="/Users/andrii/project-name            s/build" -S="/Users/andrii/project-name            s" 

zsh:1: command not found: cmake

 *  The terminal process "/bin/zsh '-l', '-c', 'cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -B="/Users/andrii/project-name            s/build" -S="/Users/andrii/project-name            s"'" failed to launch (exit code: 127). 

@github-actions
Copy link

Pull request has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Sep 17, 2023
@github-actions github-actions bot closed this Sep 23, 2023
@radurentea radurentea removed the stale Stale PR or Issue label Sep 27, 2023
@radurentea radurentea reopened this Sep 27, 2023
@github-actions
Copy link

Pull request has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Oct 13, 2023
@github-actions github-actions bot closed this Oct 19, 2023
@radurentea radurentea removed the stale Stale PR or Issue label Oct 19, 2023
@radurentea radurentea reopened this Oct 19, 2023
Copy link

github-actions bot commented Nov 4, 2023

Pull request has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Nov 4, 2023
@github-actions github-actions bot closed this Nov 13, 2023
@brianignacio5 brianignacio5 reopened this Nov 13, 2023
@brianignacio5 brianignacio5 added ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot and removed stale Stale PR or Issue labels Nov 13, 2023
@brianignacio5 brianignacio5 removed this from the v1.7.0 milestone Jan 24, 2024
@nrgbistro
Copy link

Unfortunately I don't have the time or skill to contribute but I would love to see this merged in the next release!

For context, I put both my IDF_PATH and IDF_TOOLS_PATH in locations that contain no spaces. However, I still cannot build my project that is stored in the following path: C:\Users\username\OneDrive - xxxx University\Classes\2024 Spring\IOT\Labs\Lab 1

Here's the build error:

Executing task: cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -B c:\Users\username\OneDrive - xxxx University\Classes\2024 Spring\IOT\Labs\Lab 1\build -S c:\Users\username\OneDrive - xxxx University\Classes\2024 Spring\IOT\Labs\Lab 1 

CMake Warning:
  Ignoring extra path from command line:

   "1"


CMake Error: Unknown argument -
CMake Error: Run 'cmake --help' for all supported options.

I've tried a few combinations of paths and can't seem to get consistent results unless there are no spaces present in the path, which makes using OneDrive very difficult. I'm using v1.7.0 of this extension.

@kolipakakondal kolipakakondal added this to the v1.8.0 milestone Feb 5, 2024
@radurentea
Copy link
Collaborator Author

New PR for adding support for white spaces can be found here:
#1159

@radurentea radurentea closed this Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot install on Windows because my Windows user id has a space in it (VSC-1090)
6 participants