Skip to content

Replace git submodule with package dependency for tree-sitter integration#23

Merged
mattmassicotte merged 3 commits into
tree-sitter:mainfrom
yeatse:package-dependency
Apr 13, 2024
Merged

Replace git submodule with package dependency for tree-sitter integration#23
mattmassicotte merged 3 commits into
tree-sitter:mainfrom
yeatse:package-dependency

Conversation

@yeatse
Copy link
Copy Markdown
Contributor

@yeatse yeatse commented Apr 13, 2024

Some of the dependencies of my project (like Runestone) rely on the tree-sitter project directly, which leads to conflicts due to duplicated symbols. This PR tries to fix this by replacing the tree-sitter git submodule with a Swift package dependency.

Note that the tree-sitter-swift submodule remains unchanged in this PR because it is currently used only for testing purposes, and altering it would introduce unnecessary dependencies.

@mattmassicotte
Copy link
Copy Markdown
Contributor

Thank you so much for this! I've been thinking about this change for a very long time myself.

It's a shame this conflict is even a thing. I'd love to find a way to share more significant infrastructure with Runestone aside from just the runtime. But, until that day comes, I think this is a good tradeoff for the sake of compatibility.

@mattmassicotte
Copy link
Copy Markdown
Contributor

Ah looks like perhaps some tests still need to be updated?

@yeatse
Copy link
Copy Markdown
Contributor Author

yeatse commented Apr 13, 2024

Ah looks like perhaps some tests still need to be updated?

Fixed

@yeatse
Copy link
Copy Markdown
Contributor Author

yeatse commented Apr 13, 2024

Some of the tests are still failing. Let me have a look.

@mattmassicotte
Copy link
Copy Markdown
Contributor

The tree-sitter package has a higher-than-required watchOS version. Lowering that will be a pain, so let's just raise it here.

@yeatse
Copy link
Copy Markdown
Contributor Author

yeatse commented Apr 13, 2024

The tree-sitter package has a higher-than-required watchOS version. Lowering that will be a pain, so let's just raise it here.

From the documentation if we don't specify a platform requirement, the oldest deployment targets will be selected by default. So we can just remove it to keep consistency with the tree-sitter package.

@mattmassicotte
Copy link
Copy Markdown
Contributor

Ah. The documentation is right! Leaving it out is fine if you don't actually rely on the implicit value. If it does matter, clients that change to a lower swift version will implicitly lower yours and cause breakage.

In general, I've found it to be a rare, but annoying compatibility issue when left blank.

@mattmassicotte
Copy link
Copy Markdown
Contributor

But, I also don't want to make too much work for you. I'lll deal with that if it comes up!

@mattmassicotte mattmassicotte merged commit b39502d into tree-sitter:main Apr 13, 2024
@yeatse yeatse deleted the package-dependency branch April 13, 2024 13:44
jimsynz pushed a commit to jimsynz/outrun that referenced this pull request Oct 13, 2025
… "0.25.0" (#78)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [tree-sitter/swift-tree-sitter](https://github.com/tree-sitter/swift-tree-sitter) | minor | `from: "0.8.0"` -> `from: "0.25.0"` |

---

### Release Notes

<details>
<summary>tree-sitter/swift-tree-sitter (tree-sitter/swift-tree-sitter)</summary>

### [`v0.25.0`](tree-sitter/swift-tree-sitter@0.9.0...0.25.0)

[Compare Source](tree-sitter/swift-tree-sitter@0.9.0...0.25.0)

### [`v0.9.0`](https://github.com/tree-sitter/swift-tree-sitter/releases/tag/0.9.0)

[Compare Source](tree-sitter/swift-tree-sitter@0.8.0...0.9.0)

#### What's Changed

- fix ios cannot load queries issue by [@&#8203;ElvisWong213](https://github.com/ElvisWong213) in [tree-sitter/swift-tree-sitter#22](tree-sitter/swift-tree-sitter#22)
- Replace git submodule with package dependency for tree-sitter integration by [@&#8203;yeatse](https://github.com/yeatse) in [tree-sitter/swift-tree-sitter#23](tree-sitter/swift-tree-sitter#23)
- Hotfix alloc crash, when no read data avail. by [@&#8203;furby-tm](https://github.com/furby-tm) in [tree-sitter/swift-tree-sitter#24](tree-sitter/swift-tree-sitter#24)
- Fix README formatting by [@&#8203;nakajima](https://github.com/nakajima) in [tree-sitter/swift-tree-sitter#27](tree-sitter/swift-tree-sitter#27)
- export tree sitter's id field by [@&#8203;lijunsong](https://github.com/lijunsong) in [tree-sitter/swift-tree-sitter#28](tree-sitter/swift-tree-sitter#28)
- Add `reset` Method On Parser by [@&#8203;thecoolwinter](https://github.com/thecoolwinter) in [tree-sitter/swift-tree-sitter#30](tree-sitter/swift-tree-sitter#30)
- Deprecate `ResolvingQueryCursor. injections()`
- Lots of documentation additions
- `includedRanges` API for both `Tree` and `MutableTree`
- Many bug fixes for `LanguageLayer`
- Sublayer resolution is now opt-in
- Some concurrency-related fixes
- Parser bundle queries are now found on iOS
- Removed the need for escaping closures in parsing functions
- Attempting to use a language layer query that is unsupported now throws
- Use tree-sitter 0.23.0

#### New Contributors

- [@&#8203;ElvisWong213](https://github.com/ElvisWong213) made their first contribution in [tree-sitter/swift-tree-sitter#22](tree-sitter/swift-tree-sitter#22)
- [@&#8203;yeatse](https://github.com/yeatse) made their first contribution in [tree-sitter/swift-tree-sitter#23](tree-sitter/swift-tree-sitter#23)
- [@&#8203;furby-tm](https://github.com/furby-tm) made their first contribution in [tree-sitter/swift-tree-sitter#24](tree-sitter/swift-tree-sitter#24)
- [@&#8203;nakajima](https://github.com/nakajima) made their first contribution in [tree-sitter/swift-tree-sitter#27](tree-sitter/swift-tree-sitter#27)
- [@&#8203;lijunsong](https://github.com/lijunsong) made their first contribution in [tree-sitter/swift-tree-sitter#28](tree-sitter/swift-tree-sitter#28)
- [@&#8203;thecoolwinter](https://github.com/thecoolwinter) made their first contribution in [tree-sitter/swift-tree-sitter#30](tree-sitter/swift-tree-sitter#30)

**Full Changelog**: <tree-sitter/swift-tree-sitter@0.8.0...0.9.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) in timezone Pacific/Auckland, Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) in timezone Pacific/Auckland.

🚦 **Automerge**: Disabled because a matching PR was automerged previously.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNy4wIiwidXBkYXRlZEluVmVyIjoiNDEuODIuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUiXX0=-->

Reviewed-on: https://harton.dev/outrun/outrun/pulls/78
Co-authored-by: Renovate Bot <bot@harton.nz>
Co-committed-by: Renovate Bot <bot@harton.nz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants