Skip to content

Commit

Permalink
Pins against fork of Tree-sitter (#306)
Browse files Browse the repository at this point in the history
* Improves formatting of Package.swift

* Depends on master branch of Tree-sitter

* Uses fork of Tree-sitter

* Fixes formatting

* Updates Package.resolved

* Removes trailing whitespace
  • Loading branch information
simonbs committed Jul 17, 2023
1 parent ffc09f7 commit 00dee9f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"pins": [
{
"package": "TreeSitter",
"repositoryURL": "https://github.com/tree-sitter/tree-sitter",
"repositoryURL": "https://github.com/simonbs/tree-sitter",
"state": {
"branch": null,
"revision": "9fd128ed604bb63348281bd4ac0d99705e713147",
"version": null
"revision": "f88ae4ebe351d8aa99c31a17111607017d805118",
"version": "0.20.9-beta-1"
}
}
]
Expand Down
18 changes: 13 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@ let package = Package(
.library(name: "Runestone", targets: ["Runestone"])
],
dependencies: [
// Pins tree-sitter to the merge commit when SPM was added. This will be changed to pin to a release, when a release is created that includes SPM.
.package(url: "https://github.com/tree-sitter/tree-sitter", .revision("9fd128ed604bb63348281bd4ac0d99705e713147"))
// Tree-sitter supports SPM but as of writing this, the official Tree-sitter repository has no versions published that contains the Package.swift file. Therefore, we depend on a fork of Tree-sitter that has a version published.
// We will pin against the official version of Tree-sitter as soon as a new version is published.
.package(url: "https://github.com/simonbs/tree-sitter", from: "0.20.9-beta-1")
],
targets: [
.target(name: "Runestone", dependencies: [
.product(name: "TreeSitter", package: "tree-sitter")
], resources: [.process("TextView/Appearance/Theme.xcassets")]),
.target(name: "TestTreeSitterLanguages", cSettings: [.unsafeFlags(["-w"])]),
.testTarget(name: "RunestoneTests", dependencies: ["Runestone", "TestTreeSitterLanguages"])
], resources: [
.process("TextView/Appearance/Theme.xcassets")
]),
.target(name: "TestTreeSitterLanguages", cSettings: [
.unsafeFlags(["-w"])
]),
.testTarget(name: "RunestoneTests", dependencies: [
"Runestone",
"TestTreeSitterLanguages"
])
]
)

0 comments on commit 00dee9f

Please sign in to comment.