microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
184 stars 55 forks source link

Pre configure script no longer working in Dev Container. #553

Closed xiahualiu closed 5 months ago

xiahualiu commented 5 months ago

My team have been using this tool for our project in Dev Container for a while. I believe the recent update I think (maybe 1-2 months ago around the Xmas update) broke the pre configure script's function.

The error log (username marked up):

Pre-configuring... Script: "/home/fake-user/software/pre-make.sh" /bin/bash: /run/user/1001/wrapConfigureScript-907dd20c.sh: No such file or directory The pre-configure script failed. This project may not configure successfully.

I also ls-ed the folder on the docker Debian OS, there is no /run/user/1001/ folder.

Remote OS Environment:

Right now we have to add the pre make script to .profile, can you look into it and solve the issue?

PS: Can the makefile tool have per-configuration pre-configuration script? Something like:

    "makefile.configurations": [
        {
            "name": "target1",
            "makeArgs": [
                "TARGET=T1",
            ],
            "preConfigureScript": "${workspaceFolder}/pre-make1.sh"
        },
        {
            "name": "target2",
            "makeArgs": [
                "TARGET=T2",
            ],
            "preConfigureScript": "${workspaceFolder}/pre-make2.sh"
        }
    ],

Right now it only supports one pre-configuration script for all Configuration list and this really doesn't make any sense since this tool supports multiple configurations, and not multiple pre-configuration scripts.

Thanks for all the work for this! This is an amazing tool to use so far and I hope it get better!

gcampbell-msft commented 5 months ago

@xiahualiu Thanks for letting us know.

To answer your question about configurations and preConfigureScripts. The current design is for you to have one single preConfigureScript, and then in the different configurations, you can use preConfigureScriptsArgs per-configuration in order to modify any functionality you need in the script itself.

However, if you'd like to suggest a different model (as you did), please open a separate issue just for that, so we can track it independently.

As for the preConfigureScript no longer working, this is definitely something to look into, I will mark this as a bug that needs investigation. As I investigate I may follow up with questions to help me get information.

Again, thank you for letting us know!

gcampbell-msft commented 5 months ago

@xiahualiu To confirm, the extension is installed on VS Code inside on the container? Which is a Debian linux OS?

gcampbell-msft commented 5 months ago

@xiahualiu I believe I may know what the issue is, could you please install this vsix using the following steps and let me know if it fixes your issue?

  1. Download the zip file. makefile-tools.zip

  2. Modify the extension from .zip to .vsix.

  3. Install the extension manually in VS Code. image

  4. Test and let me know!

xiahualiu commented 5 months ago

@xiahualiu To confirm, the extension is installed on VS Code inside on the container? Which is a Debian linux OS?

Our development environment is distributed by a docker image, and it is based on the old Debian buster image.

The system setup is like: Windows 10 --> WSL 2 --> Debian container (Dev Environment)

VS Code runs on Windows 10 and connects to the Debian container in the following order:

Windows 10(VS Code) -- WSL 2(with WSL extension) -- Debian container (Dev Container extension)

We also have a no docker version of the dev environment that is running on top of the WSL2 (VSCode only needs the WSL extension), the Makefile extension works fine on WSL2 but not the dev container on WSL2.

Thank you for the reply, I will test the extension you sent me next week, hope it solves the problem!

gcampbell-msft commented 5 months ago

@xiahualiu Have you had a chance to test the extension? Thanks!

xiahualiu commented 5 months ago

@gcampbell-msft I tried the extension and can confirm it solved this issue.