Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
platforms: ${{ steps.platforms.outputs.platforms }}
scheme: ${{ steps.scheme.outputs.scheme }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: true

- name: Setup Xcode
run: sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app

Expand All @@ -31,6 +34,7 @@ jobs:
run: |
curl https://mise.run | sh
mise install

- name: Run linters
run: mise lint

Expand Down Expand Up @@ -68,7 +72,10 @@ jobs:
matrix:
platform: ${{ fromJSON(needs.prepare.outputs.platforms) }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: true

- name: Setup Xcode
run: sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app

Expand Down Expand Up @@ -109,7 +116,8 @@ jobs:
set -o pipefail
xcodebuild build \
-scheme ${{ needs.prepare.outputs.scheme }} \
-destination "${{ steps.destination.outputs.destination }}" | \
-destination "${{ steps.destination.outputs.destination }}" \
-IDEPackageEnablePrebuilts=NO | \
xcbeautify --renderer github-actions

- name: Test (SPM)
Expand All @@ -129,7 +137,8 @@ jobs:
set -o pipefail
xcodebuild test \
-scheme ${{ needs.prepare.outputs.scheme }} \
-destination "${{ steps.destination.outputs.destination }}" | \
-destination "${{ steps.destination.outputs.destination }}" \
-IDEPackageEnablePrebuilts=NO | \
xcbeautify --renderer github-actions

- name: Check coverage (SPM)
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
release:
runs-on: macos-26
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0

- name: Setup Xcode
run: sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app

Expand Down
6 changes: 2 additions & 4 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[vars]
sources = "Sources"
tests = "Tests"
swiftlint = '~/.local/bin/mise x -- swiftlint'
swiftformat = '~/.local/bin/mise x -- swiftformat'

Expand All @@ -19,7 +17,7 @@ run = """
{{ vars.swiftlint }} lint \
--config .swiftlint.yml \
--strict \
{{ vars.sources }}
Sources Macros

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify hardcoded paths match current project structure.

The migration from template variables to literal strings "Sources Macros" and "Tests" is clearer but now hardcoded. Ensure these paths correctly reflect the directory structure after removing PrincipleMacrosTestSupport and PrincipleMacrosClientSupport targets.

Run the following to verify these directories exist and are appropriate:

Also applies to: 31-31


🏁 Script executed:

#!/bin/bash
# Verify the paths used in .mise.toml exist

echo "Checking swiftlint:sources paths..."
ls -ld Sources 2>/dev/null && echo "✓ Sources exists" || echo "✗ Sources missing"
ls -ld Macros 2>/dev/null && echo "✓ Macros exists" || echo "✗ Macros missing"

echo -e "\nChecking swiftlint:tests path..."
ls -ld Tests 2>/dev/null && echo "✓ Tests exists" || echo "✗ Tests missing"

echo -e "\nVerifying Package.swift no longer references removed targets..."
grep -E "PrincipleMacrosTestSupport|PrincipleMacrosClientSupport" Package.swift && echo "✗ Old targets still referenced" || echo "✓ Old targets removed"

Length of output: 313



🏁 Script executed:

#!/bin/bash
# Search for Macros-related targets and understand the project structure

echo "=== Searching Package.swift for Macros targets ==="
grep -n "\.target.*[Mm]acro" Package.swift | head -20

echo -e "\n=== Checking all top-level directories ==="
ls -ld */ 2>/dev/null | awk '{print $NF}'

echo -e "\n=== Searching for any Macros directory recursively ==="
find . -maxdepth 2 -type d -name "*[Mm]acro*" 2>/dev/null

echo -e "\n=== Viewing current .mise.toml around lines 20 and 31 ==="
sed -n '15,35p' .mise.toml

Length of output: 656


Fix hardcoded path: "Macros" directory does not exist at project root.

The migration to hardcoded literal "Sources Macros" introduced a configuration error. Project structure shows only Sources/ and Tests/ at the root level; macro-related code resides at Sources/PrincipleMacros/, not as a standalone Macros directory. Line 20 should reference only Sources (which encompasses PrincipleMacros as a subdirectory):

Sources

Alternatively, if macro linting requires a distinct path, adjust to Sources/PrincipleMacros, but verify swiftlint supports nested directory targeting.

🤖 Prompt for AI Agents
.mise.toml around line 20: the entry "Sources Macros" is a hardcoded/incorrect
path because there is no top-level Macros directory; update the line to
reference the correct directory—either "Sources" to include PrincipleMacros as a
subdirectory, or "Sources/PrincipleMacros" if linting needs an explicit macro
path—then verify the tool accepts nested paths (and use that form if required).

"""

[tasks."swiftlint:tests"]
Expand All @@ -30,7 +28,7 @@ run = """
--config .swiftlint.yml \
--config .swiftlint.tests.yml \
--strict \
{{ vars.tests }}
Tests
"""

[tasks.swiftformat]
Expand Down
3 changes: 3 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ file_header:
// Copyright © \d{4} .+\. All rights reserved\.
//

excluded:
- Macros/Dependencies

file_length:
warning: 500

Expand Down
21 changes: 0 additions & 21 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ let package = Package(
.library(
name: "PrincipleMacros",
targets: ["PrincipleMacros"]
),
.library(
name: "PrincipleMacrosTestSupport",
targets: ["PrincipleMacrosTestSupport"]
),
.library(
name: "PrincipleMacrosClientSupport",
targets: ["PrincipleMacrosClientSupport"]
)
],
dependencies: [
Expand All @@ -43,19 +35,6 @@ let package = Package(
)
]
),
.target(
name: "PrincipleMacrosTestSupport",
dependencies: [
"PrincipleMacros",
.product(
name: "SwiftSyntaxMacrosTestSupport",
package: "swift-syntax"
)
]
),
.target(
name: "PrincipleMacrosClientSupport"
),
.testTarget(
name: "PrincipleMacrosTests",
dependencies: [
Expand Down
17 changes: 0 additions & 17 deletions Sources/PrincipleMacrosClientSupport/AccessControlLevel.swift

This file was deleted.

10 changes: 0 additions & 10 deletions Sources/PrincipleMacrosTestSupport/Imports.swift

This file was deleted.

Loading