Skip to content

Changes to swift.swiftEnvironmentVariables require a restart before they're reflected in the build tasks #1428

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

Open
plemarquand opened this issue Mar 12, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@plemarquand
Copy link
Contributor

Built in built tasks (Debug MyProject, Release MyProject) are created once, and are not updated when the user changes the swift.swiftEnvironmentVariables setting. They must restart the extension before the build task is updated with the new environment variable(s).

@plemarquand plemarquand added the bug Something isn't working label Mar 12, 2025
plemarquand added a commit to plemarquand/vscode-swift that referenced this issue Mar 12, 2025
The generated Swift build tasks are created once when the workspace
folder is added to the workspace. The environment variables are captured
at task creation time. If they're updated during the lifetime of the
extension they wont be attached to the generated tasks until the
extension restarts.

Issue: swiftlang#1428
plemarquand added a commit that referenced this issue Mar 14, 2025
The generated Swift build tasks are created once when the workspace
folder is added to the workspace. The environment variables are captured
at task creation time. If they're updated during the lifetime of the
extension they wont be attached to the generated tasks until the
extension restarts.

Issue: #1428
@award999 award999 added needs verification Issue has been fixed, but requires verification before closing and removed needs verification Issue has been fixed, but requires verification before closing labels Mar 21, 2025
@award999 award999 moved this from Unscreened to Backlog in Swift Extension for Visual Studio Code Mar 21, 2025
@award999
Copy link
Contributor

We prompt to restart but overall should handle better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants