Skip to content

Commit

Permalink
Add Codable conformance, remove linux for now, fix deprecated syntax (#…
Browse files Browse the repository at this point in the history
…122)

* Add Codable conformance

* Reset structure dependency

* Update to Swift 5

* Remove linux support

* Update xcode

* Add @usableFromInline decorators

* Add linux support

* Remove linux support

* Replace hashValue with hash

* Update packages

* Update Math dependency
  • Loading branch information
bwetherfield authored Jun 30, 2019
1 parent 162a47f commit 421ae11
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
os:
- osx
- linux
language: generic
sudo: required
dist: trusty
osx_image: xcode10.2
install:
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
env:
- SWIFT_VERSION=5.0
script:
- swift package update
- swift test
Expand Down
12 changes: 6 additions & 6 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"package": "Math",
"repositoryURL": "https://github.com/dn-m/Math",
"state": {
"branch": "swift-5",
"revision": "51f8032aa2aea3e8a88b44dcc858c4551b855478",
"version": null
"branch": null,
"revision": "0bf8de5d353b7b7957cb2231395f6818bc575b47",
"version": "0.7.1"
}
},
{
Expand All @@ -23,9 +23,9 @@
"package": "Structure",
"repositoryURL": "https://github.com/dn-m/Structure",
"state": {
"branch": "swift-5",
"revision": "8f67514cba950f60ee992a8d0996d4f11d9654b0",
"version": null
"branch": null,
"revision": "fc7d6a9dbaeb9c750988a6a142d5f67e395ddf69",
"version": "0.23.0"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:4.2
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -14,7 +14,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/dn-m/Structure", from: "0.23.0"),
.package(url: "https://github.com/dn-m/Math", from: "0.7.0")
.package(url: "https://github.com/dn-m/Math", from: "0.7.1")
],
targets: [

Expand Down
3 changes: 2 additions & 1 deletion Sources/Duration/Rhythm/ProportionTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ public func * (duration: Int, durations: [Int]) -> ProportionTree {

/// Tree recording the change (in degree of power-of-two) needed to normalize a
/// `ProprtionTree`.
public typealias DistanceTree = Tree<Int,Int>
@usableFromInline
typealias DistanceTree = Tree<Int,Int>

extension Tree where Branch == Int, Leaf == Int {

Expand Down
3 changes: 2 additions & 1 deletion Sources/MusicModel/Data Structures/IntervalSearchTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import Math
public struct IntervalSearchTree <Metric: Comparable, Value> {

/// Underlying `AVLTree` augmented for interval searching purposes.
public typealias Base = AVLTree<Metric,Node>
@usableFromInline
typealias Base = AVLTree<Metric,Node>

public struct Node {

Expand Down
1 change: 1 addition & 0 deletions Sources/Pitch/NoteNumber.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ extension NoteNumber {

extension NoteNumber: Equatable { }
extension NoteNumber: Hashable { }
extension NoteNumber: Codable { }

extension NoteNumber: CustomStringConvertible {

Expand Down
1 change: 0 additions & 1 deletion Sources/Pitch/NoteNumberRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ extension NoteNumberRepresentable {

// MARK: - Hashable

/// - Returns: The hash value of a `NoteNumberRepresentable` type.
public func hash(into hasher: inout Hasher) {
hasher.combine(value)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pitch/Pitch.Class.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ extension Pitch.Class {
}

extension Pitch.Class.Collection: Equatable { }

extension Pitch.Class: Codable { }
extension Pitch.Class.Collection: ExpressibleByArrayLiteral {

// MARK: - ExpressibleByArrayLiteral
Expand Down

0 comments on commit 421ae11

Please sign in to comment.