Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mobrien-ghost committed Nov 1, 2024
2 parents 377bf95 + 90195c0 commit e9f04e1
Show file tree
Hide file tree
Showing 25 changed files with 170 additions and 106 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/test-xcode-versions.yml

This file was deleted.

74 changes: 64 additions & 10 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,82 @@ on:
- 'release/**'

jobs:
swift_tests_latest:
name: Latest Swift
runs-on: macos-15
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.0"
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: .build
key: macos-latest-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
macos-latest-spm-
test:
name: Unit Test
runs-on: macos-latest
- name: Create test configuration
run: chmod +x ./build_configuration.sh && ./build_configuration.sh
shell: bash

- name: Build
run: swift build

- name: Run tests
run: swift test
swift_tests_previous:
name: Swift 5.10
runs-on: macos-14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15.0"
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: .build
key: macos-14-swift-510-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
macos-14-swift-510-spm-
- name: Create test configuration
run: chmod +x ./build_configuration.sh && ./build_configuration.sh
shell: bash

- name: Build
run: swift build

- name: Run tests
run: swift test
swift_tests_legacy:
name: Swift ${{ matrix.swift }}
strategy:
matrix:
os: [macos-13]
swift: ["5.9", "5.8"]
runs-on: ${{ matrix.os }}
steps:
- uses: swift-actions/setup-swift@v1
- name: Get swift version
run: swift --version
with:
swift-version: ${{ matrix.swift }}
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "14.3.1"
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
key: ${{ matrix.os }}-${{ matrix.swift }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
${{ matrix.os }}-spm-
- name: Create test configuration
run: chmod +x ./build_configuration.sh && ./build_configuration.sh
shell: bash

- name: Build
run: xcodebuild build -scheme IndexStore -configuration Debug -destination "platform=macOS"
run: swift build

- name: Test
run: xcodebuild test-without-building -scheme IndexStore -configuration Debug -destination "platform=macOS" -enableCodeCoverage YES
- name: Run tests
run: swift test
16 changes: 16 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file.

## [3.0.1] - 2024-01-11

### Fixed

- Added missing compatability commits for swift 5.8, 5.9, and 5.10
- Added modern SPM unit test runners
- Removed xcode-driven tests

## [3.0.0] - 2024-01-11

### Added

- Explicit Swift 6 language mode support
- Dropped swift 5.5->5.7


## [2.0.1] - 2023-03-12

### Added
Expand Down
13 changes: 7 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version: 5.8
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "IndexStore",
platforms: [.macOS(.v10_13)],
platforms: [.macOS(.v11)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand All @@ -14,9 +14,8 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
.package(url: "https://github.com/apple/indexstore-db.git", branch: "release/5.9.1"),
.package(url: "https://github.com/apple/swift-tools-support-core.git", exact: Version("0.4.0")),
.package(url: "https://github.com/swiftlang/indexstore-db.git", revision: "swift-6.0.2-RELEASE"),
.package(url: "https://github.com/apple/swift-tools-support-core.git", exact: Version("0.7.1")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand All @@ -26,10 +25,12 @@ let package = Package(
dependencies: [
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
.product(name: "IndexStoreDB", package: "indexstore-db"),
.product(name: "Logging", package: "swift-log"),
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
],
swiftSettings: [
.swiftLanguageMode(.v6)
]
),
.testTarget(
Expand Down
15 changes: 9 additions & 6 deletions Package@swift-5.7.swift → Package@swift-5.10.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version: 5.7
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "IndexStore",
platforms: [.macOS(.v10_13)],
platforms: [.macOS(.v11)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand All @@ -14,9 +14,8 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
.package(url: "https://github.com/apple/indexstore-db.git", branch: "release/5.9.1"),
.package(url: "https://github.com/apple/swift-tools-support-core.git", exact: Version("0.4.0")),
.package(url: "https://github.com/swiftlang/indexstore-db.git", revision: "swift-6.0.2-RELEASE"),
.package(url: "https://github.com/swiftlang/swift-tools-support-core.git", exact: Version("0.7.1")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand All @@ -26,7 +25,6 @@ let package = Package(
dependencies: [
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
.product(name: "IndexStoreDB", package: "indexstore-db"),
.product(name: "Logging", package: "swift-log"),
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
Expand All @@ -43,3 +41,8 @@ let package = Package(
),
]
)

// Supplementary
package.dependencies.append(contentsOf: [
.package(url: "https://github.com/SwiftPackageIndex/SPIManifest.git", from: "0.12.0"),
])
15 changes: 9 additions & 6 deletions Package@swift-5.5.swift → Package@swift-5.8.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version:5.5
// swift-tools-version: 5.8
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "IndexStore",
platforms: [.macOS(.v10_13)],
platforms: [.macOS(.v11)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand All @@ -14,9 +14,8 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
.package(url: "https://github.com/apple/indexstore-db.git", branch: "release/5.9.1"),
.package(url: "https://github.com/apple/swift-tools-support-core.git", .exact("0.4.0")),
.package(url: "https://github.com/swiftlang/indexstore-db.git", revision: "swift-6.0.2-RELEASE"),
.package(url: "https://github.com/swiftlang/swift-tools-support-core.git", exact: Version("0.7.1")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand All @@ -26,7 +25,6 @@ let package = Package(
dependencies: [
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
.product(name: "IndexStoreDB", package: "indexstore-db"),
.product(name: "Logging", package: "swift-log"),
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
Expand All @@ -43,3 +41,8 @@ let package = Package(
),
]
)

// Supplementary
package.dependencies.append(contentsOf: [
.package(url: "https://github.com/SwiftPackageIndex/SPIManifest.git", from: "0.12.0"),
])
15 changes: 9 additions & 6 deletions Package@swift-5.6.swift → Package@swift-5.9.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version: 5.6
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "IndexStore",
platforms: [.macOS(.v10_13)],
platforms: [.macOS(.v11)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand All @@ -14,9 +14,8 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
.package(url: "https://github.com/apple/indexstore-db.git", branch: "release/5.9.1"),
.package(url: "https://github.com/apple/swift-tools-support-core.git", exact: Version("0.4.0")),
.package(url: "https://github.com/swiftlang/indexstore-db.git", revision: "swift-6.0.2-RELEASE"),
.package(url: "https://github.com/swiftlang/swift-tools-support-core.git", exact: Version("0.7.1")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand All @@ -26,7 +25,6 @@ let package = Package(
dependencies: [
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
.product(name: "IndexStoreDB", package: "indexstore-db"),
.product(name: "Logging", package: "swift-log"),
],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
Expand All @@ -43,3 +41,8 @@ let package = Package(
),
]
)

// Supplementary
package.dependencies.append(contentsOf: [
.package(url: "https://github.com/SwiftPackageIndex/SPIManifest.git", from: "0.12.0"),
])
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FCheekyGhost-Labs%2FIndexStore%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/CheekyGhost-Labs/IndexStore) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FCheekyGhost-Labs%2FIndexStore%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/CheekyGhost-Labs/IndexStore)

IndexStore is a library providing that provides a query-based approach for searching for and working with source symbols within an indexed code base. It is built on top of the [Apple IndexStoreDB Library](https://github.com/apple/indexstore-db), which provides access to the index data produced by the swift compiler.
IndexStore is a library providing that provides a query-based approach for searching for and working with source symbols within an indexed code base. It is built on top of the [Apple IndexStoreDB Library](https://github.com/swiftlang/indexstore-db), which provides access to the index data produced by the swift compiler.

With this library, you can easily search for and analyze symbols in your code, making it a powerful tool for building developer tools, static analyzers, and code refactoring utilities.

Expand Down Expand Up @@ -187,7 +187,7 @@ let package = Package(
// name, platforms, products, etc.
dependencies: [
// other dependencies
.package(url: "https://github.com/CheekyGhost-Labs/IndexStore.git", branch: "release/2.0"),
.package(url: "https://github.com/CheekyGhost-Labs/IndexStore.git", branch: "release/3.0"),
],
targets: [
.executableTarget(name: "<command-line-tool>", dependencies: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/IndexStore/IndexStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import IndexStoreDB
import Logging
import OSLog
import TSCBasic

/// Class abstracting `IndexStoreDB` functionality that serves ``SourceSymbol`` results.
Expand Down
Loading

0 comments on commit e9f04e1

Please sign in to comment.