swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.72k stars 1.34k forks source link

Fix environment related warnings #7684

Closed rauhul closed 3 months ago

rauhul commented 3 months ago

Adds a new Environment type to replace TSCBasics EnvironmentVariables and ProcessEnvironmentBlock types. Updates points of use of the older APIs with the newer API and adds unit tests for Environment.

MaxDesiatov commented 3 months ago

If you insist on moving it out of Basics, it could be kept in Basics here as a stopgap measure. After AsyncProcess PR is merged, Environment could be moved to that new AsyncProcess module.

xedin commented 3 months ago

It seems like AsyncProcess module is indeed a good place for this type.

MaxDesiatov commented 3 months ago

Main problem with that is a dependency on AbsolutePath in the AsyncProcess type itself. For the sake of not opening that can of modularization worms, I'd prefer this PR to be focused on fixing the actual warnings only. We can come back to modularization issues separately. This would also make PRs smaller and easier to review.

rauhul commented 3 months ago

@swift-ci test

rauhul commented 3 months ago

@swift-ci test windows

MaxDesiatov commented 3 months ago

@compnerd would you have a moment to look how well this works for Windows compatibility?

MaxDesiatov commented 3 months ago

@swift-ci test windows

rauhul commented 3 months ago

@swift-ci test

rauhul commented 3 months ago

@swift-ci test windows

rauhul commented 3 months ago

@swift-ci test windows

rauhul commented 3 months ago

looks like windows CI is failing to checkout Swift which is odd because the other checks are working

rauhul commented 3 months ago

@swift-ci test windows

MaxDesiatov commented 3 months ago

@swift-ci test windows

rauhul commented 3 months ago

@swift-ci test

rauhul commented 3 months ago

@swift-ci test windows