Skip to content

Package.swift: provide an option to link against ANTLR 4 statically - #3906

Merged
parrt merged 1 commit into
antlr:devfrom
edigaryev:swift-static-linkage-option
Oct 10, 2022
Merged

parrt merged 1 commit into
antlr:devfrom
edigaryev:swift-static-linkage-option

Conversation

@edigaryev

Copy link
Copy Markdown
Contributor

Problem: currently there's no way to link against ANTLR 4 statically from Swift, which is a deal-breaker if you want to ship a single binary. See openai/tart#230 for example.

Solution: normally, the type: .dynamic should be omitted from library product specification, but changing this now might break things for Swift users. Solve this by introducing a separate Swift PM product Antlr4Static that explicitly specifies type: .static.

Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
@edigaryev

Copy link
Copy Markdown
Contributor Author

@parrt mind taking a look at this?

We need this to be able to use ANTLR 4 in Tart, see openai/tart#230.

Thanks!

@parrt

parrt commented Sep 30, 2022

Copy link
Copy Markdown
Member

ok, though we normally do PRs on dev. can you rebase on that?

@parrt parrt added this to the 4.11.2 milestone Sep 30, 2022
@edigaryev
edigaryev changed the base branch from master to dev October 1, 2022 20:13
@edigaryev

Copy link
Copy Markdown
Contributor Author

ok, though we normally do PRs on dev. can you rebase on that?

Done 👌

@edigaryev

Copy link
Copy Markdown
Contributor Author

@parrt sorry to nudge you, but mind taking a look at this once more?

@parrt
parrt merged commit 2703a85 into antlr:dev Oct 10, 2022
@parrt

parrt commented Oct 10, 2022

Copy link
Copy Markdown
Member

Thanks for the nudge. I get way too much email from way too many open source packages to maintain ha ha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants