Skip to content

Recipe: Get rid of all use of LinuxDistribution in SDKGenerator #68

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

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Jan 15, 2024

LinuxDistribution , Versionsconfiguration, and DownloadableArtifacts are quite Linux specific and they are generally not required to build Swift SDK. The latter two might be reusable for other platforms, but it would be better to use from each SDK recipe instead of using it in SDK generator directly.

@kateinoigakukun kateinoigakukun force-pushed the yt/generator-move-linux-specific-things branch 2 times, most recently from 8166246 to b766a06 Compare January 15, 2024 08:08
@kateinoigakukun kateinoigakukun force-pushed the yt/generator-move-linux-specific-things branch from b766a06 to 58b8181 Compare January 15, 2024 11:57
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@kateinoigakukun kateinoigakukun marked this pull request as ready for review January 15, 2024 11:58
@MaxDesiatov MaxDesiatov requested a review from euanh January 15, 2024 11:59
@MaxDesiatov MaxDesiatov added the enhancement New feature or request label Jan 15, 2024
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@kateinoigakukun kateinoigakukun merged commit 82189ad into swiftlang:main Jan 15, 2024
@kateinoigakukun kateinoigakukun deleted the yt/generator-move-linux-specific-things branch January 15, 2024 15:05
MaxDesiatov pushed a commit that referenced this pull request Jan 29, 2024
Since #68, rebuilding a RHEL SDK bundle has failed with the following error unless the bundle is first deleted:
```
Error: The file “lib64” couldn’t be saved in the folder “rhel-ubi9.sdk” because a file with the same name already exists.
```
This is because the condition check around the cleanup logic was inverted when the check was moved into `LinuxRecipe.swift`.

#### Before: 
https://github.com/apple/swift-sdk-generator/blob/5428358a282d53e4d714b90c0348a293cca0038d/Sources/SwiftSDKGenerator/Generator/SwiftSDKGenerator%2BEntrypoint.swift#L51-L52

#### After:
https://github.com/apple/swift-sdk-generator/blob/b94744f2b3d89511145072d907a18c9ea6aa5578/Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift#L129-L130

This PR adds a test which tries to build an SDK twice without cleaning up in between.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants