Skip to content

Conversation

@johnbute
Copy link
Contributor

Handled case where SwiftBuild is run on a freeBSD OS.

Motivation:

Currently, when using the new build system, you come across the following fatal error when building on a freeBSD OS:

Fatal error: Unhandled platform condition: Platform (name: "free bsd", oldestSupportedVersion: PackageModel.PlatformVersion(version: 0.0.0))

Modifications:

All I have done is, similar to Sources/XCBuildSupport/PIFBuilder, I added the case and handled it just like XCBuild's PIFBuilder does.

Result:

After changes, no more fatal error occurs and building proceeds as it should.

@johnbute
Copy link
Contributor Author

Note: the only files changed are :

Sources/SwiftBuildSupport/PIFBuilder.swift
Tests/PackageRegistryTests/RegistryClientTests.swift
Tests/SourceKitLSPAPITests/SourceKitLSPAPITests.swift

@jakepetroules
Copy link
Contributor

Can you pull the latest main, rebase, and force push, please? This is difficult to review when it's mixed in with a bunch of other changes.

@johnbute johnbute marked this pull request as draft March 12, 2025 14:17
@johnbute johnbute force-pushed the freeBSD-platform-filter-case branch from ddd93a4 to fcd2d09 Compare March 12, 2025 14:53
@johnbute johnbute marked this pull request as ready for review March 12, 2025 14:53
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

LGTM

@MaxDesiatov
Copy link
Contributor

@swift-ci test

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

@MaxDesiatov MaxDesiatov changed the title Added handling of case when building on freebsd platform Fix unhandled platform condition with freeBSDFilters for PIFBuilder Mar 12, 2025
@MaxDesiatov MaxDesiatov changed the title Fix unhandled platform condition with freeBSDFilters for PIFBuilder Fix unhandled platform condition w/ freeBSDFilters for PIFBuilder Mar 12, 2025
@johnbute
Copy link
Contributor Author

@swift-ci test windows

@cmcgee1024 cmcgee1024 merged commit 45dba1f into swiftlang:main Mar 18, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants