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

Extension does not recognize local Visual Studio Build Tools installation for Cython compilation #5119

Closed
6 tasks done
dfischerqunevo opened this issue Dec 20, 2024 · 2 comments
Labels
Issue-Bug A bug to squash. Needs: Author Feedback Please give us the requested feedback!

Comments

@dfischerqunevo
Copy link

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

In our project we use a git hook to compile several cython files when pulling from git. This is automated with an environment variable pointing to the local powershell.exe installed with windows. This automated workflow works as intended. During programming, we need to sometimes invoke cython compilation by hand, thus triggering the ps1 script without the provided environment variable. This starts the powershell extension which is apparently not a subprocess of the local installation of powershell and tries to compile the cython files. In previous versions, this was so issue. With the recent version, the extension is not able to detect installed C++ compilers on the system, thus resulting in an error. The compilation process with other shells is possible and works as intended. We isolated the problem down to this extension.

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name             : Visual Studio Code Host
Version          : 2024.4.0
InstanceId       : c42d8070-1fcc-4865-8b53-45bb9d0d7ee8
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : de-DE
CurrentUICulture : de-DE
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio Code Version

1.96.2
fabdb6a30b49f79a7aba0f2ad9df9b399473380f
x64

Extension Version

empty (Maybe issue lies here?)

Steps to Reproduce

Compile cython files with powershelll extension.

Visuals

No response

Logs

No response

@dfischerqunevo dfischerqunevo added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Dec 20, 2024
@JustinGrote
Copy link
Collaborator

Thanks for your submission!

When you say you invoke a ps1 script, how are you doing it? Starting a ps1 script from a process should make it a child process, the fact it's ending up in the extension window implies you are using a vscode api command or similar to launch the script.

@JustinGrote JustinGrote added Needs: Author Feedback Please give us the requested feedback! and removed Needs: Triage Maintainer attention needed! labels Dec 23, 2024
Copy link
Contributor

This issue has been labeled as needing feedback and has not had any activity a week. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Needs: Author Feedback Please give us the requested feedback!
Projects
None yet
Development

No branches or pull requests

2 participants