Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Update to Swift 6
Browse files Browse the repository at this point in the history
  • Loading branch information
david-swift committed Sep 30, 2024
1 parent ee6233d commit 34f5b46
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Install Libadwaita
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
echo "<script>window.location.href += \"/documentation/adwaita\"</script>" > docs/index.html;
sed -i '' 's/#06f/#ea3358/g' docs/css/documentation-topic~topic~tutorials-overview.d6f5411c.css
sed -i '' 's/,2px/,10px/g' docs/css/index.038e887c.css
sed -i '' 's/,2px/,10px/g' docs/css/index.*.css
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.9
// swift-tools-version: 6.0
//
// Package.swift
// Adwaita
Expand Down Expand Up @@ -53,5 +53,6 @@ let package = Package(
name: "Demo",
dependencies: ["Adwaita"]
)
]
],
swiftLanguageModes: [.v5]
)
2 changes: 1 addition & 1 deletion Sources/Adwaita/Model/Extensions/Int.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by david-swift on 15.01.24.
//

extension Int: Identifiable {
extension Int: @retroactive Identifiable {

/// Get the integer itself as the identifier.
public var id: Int { self }
Expand Down
2 changes: 1 addition & 1 deletion Sources/Generation/Extensions/String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by david-swift on 14.01.24.
//

extension String: CodingKey {
extension String: @retroactive CodingKey {

/// The string.
public var stringValue: String {
Expand Down
5 changes: 1 addition & 4 deletions Sources/Generation/GIR/Property.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,12 @@ struct Property: Decodable {
let property = convertPropertyName(configuration: genConfig)
let builder = ((type?.isWidget ?? false) || (type?.isMenu ?? false)) ? "@ViewBuilder " : ""
let mainParameter = parameter(config: config, genConfig: genConfig, modifier: true, defaultValue: true)
var sideParameters = ""
var sideAssignments = ""
return """
\(doc?.docComment(indent: " ") ?? "/// \(name)")
public func \(convertPropertyName(configuration: genConfig))(\(sideParameters)\(builder)_ \(mainParameter)) -> Self {
public func \(convertPropertyName(configuration: genConfig))(\(builder)_ \(mainParameter)) -> Self {
var newSelf = self
newSelf.\(property) = \(property)
\(sideAssignments)
return newSelf
}
Expand Down
8 changes: 4 additions & 4 deletions io.github.AparokshaUI.Demo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"app-id": "io.github.AparokshaUI.Demo",
"runtime": "org.gnome.Platform",
"runtime-version": "46",
"runtime-version": "47",
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.swift5"
"org.freedesktop.Sdk.Extension.swift6"
],
"command": "Demo",
"finish-args": [
Expand All @@ -15,8 +15,8 @@
"--socket=wayland"
],
"build-options": {
"append-path": "/usr/lib/sdk/swift5/bin",
"prepend-ld-library-path": "/usr/lib/sdk/swift5/lib"
"append-path": "/usr/lib/sdk/swift6/bin",
"prepend-ld-library-path": "/usr/lib/sdk/swift6/lib"
},
"cleanup": [
"/include",
Expand Down

0 comments on commit 34f5b46

Please sign in to comment.