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

Fix some warnings with ProcessEnvironmentBlock #7364

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

MaxDesiatov
Copy link
Member

@MaxDesiatov MaxDesiatov commented Feb 23, 2024

Previous implementation didn't account for case insensitivity on Windows. Cleaning up these warnings fixes that.

This doesn't include APIs exposed by Swift Driver yet, as those are harder to adapt for ProcessEnvironmentBlock without significant source compatibility breakage.

Previous implementation didn't account for case insensitivity on Windows. Cleaning up these warnings fixes that.

This doesn't include APIs exposed by Swift Driver yet, as those are harder to adapt for `ProcessEnvironmentBlock` with significant sources compatibility breakage.
@MaxDesiatov MaxDesiatov added bug windows test suite improvements to SwiftPM test suite labels Feb 23, 2024
@MaxDesiatov
Copy link
Member Author


public typealias EnvironmentVariables = [String: String]
public typealias EnvironmentVariables = ProcessEnvironmentBlock
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to worry about this accidentally causing build issues?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we expose it anywhere outside of SwiftPM to any clients, at least not on purpose. IIUC corresponding TSC APIs were widely adopted instead. As soon as package support is merged in my other PR, I'll try using package visibility here to prevent any unintended adoption of this typealias in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use SPI in the meantime, would also make it easy to remember all the places we want package 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And can now use package.

@MaxDesiatov
Copy link
Member Author

@swift-ci test

…xd/process-environment-block

# Conflicts:
#	Package.swift
#	Sources/SPMTestSupport/SwiftPMProduct.swift
@MaxDesiatov MaxDesiatov self-assigned this Feb 24, 2024
@MaxDesiatov MaxDesiatov marked this pull request as draft March 3, 2024 18:17
…xd/process-environment-block

# Conflicts:
#	Sources/Build/BuildOperation.swift
#	Sources/Commands/PackageCommands/InstalledPackages.swift
#	Sources/SPMTestSupport/MockManifestLoader.swift
@MaxDesiatov
Copy link
Member Author

@swift-ci test

This APIs should not be marked `public` to prevent SwiftPM clients from adopting those by accident.
…-manager into maxd/process-environment-block

# Conflicts:
#	Sources/Build/BuildOperationBuildSystemDelegateHandler.swift
#	Sources/LLBuildManifest/LLBuildManifest.swift
#	Sources/LLBuildManifest/LLBuildManifestWriter.swift
#	Sources/LLBuildManifest/Tools.swift
MaxDesiatov added a commit that referenced this pull request Mar 4, 2024
This fixes some warnings without more intrusive breaking changes for SwiftPM clients, as previously attempted in #7364.

Also fixed some formatting inconsistencies.
MaxDesiatov added a commit that referenced this pull request Mar 5, 2024
This fixes some `ProcessEnv.vars` warnings without more intrusive
breaking changes for SwiftPM clients, as previously attempted in
#7364.

Also fixed some formatting inconsistencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug test suite improvements to SwiftPM test suite windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants