-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable original package patching using swift package mirroring #5
Comments
Maintaining tags for all those in the source repo isn't the only issue this repo faces. Versioning is a complex problem which Apple is much better situated to resolve given they have control of the related tooling. I'm afraid I won't be looking at this. |
I don't know if all tags are necessary to recreate. Maybe major + or minor? EDIT: However, the main problem is
I'm not sure because the build error message is very enigmatic. @vmanot Maybe you have some ideas? I guess that the problem is caused by commenting out unsafe flags for weak frameworks to link. let staticLink = ["\(clone)\(tag)/libSwiftSyntax.a"] +
modules.map { $0.name }.flatMap({ module in
["-weak_framework", module] + platforms.flatMap({
["-F", "\(clone)\(tag)/\(module).xcframework/\($0)"] })
})
(...)
.target(
name: "InstantSyntax"
// linkerSettings: [.unsafeFlags(staticLink)]
), I've did it get rid of package resolution error:
which is (in my opinion) due to an overly restrictive SPM policy towards passing custom compilation flags. @johnno1962 Have you been troubled with passing unsafe flags during InstantSyntax development? |
@lyzkov were you able to resolve the unsafe build flag issue? It seems like the manual copying is meant to override this policy #3 (comment) but it doesn't work for me. |
@benedelstein Nope. Manual copying has nothing to do with this issue because 3rd party packages that depend on the If I remember correctly, only top-level 1st party packages can have unsafe flags specified. You would have to fork all dependencies to overwrite all unsafe flags, which is an unacceptable workaround with terrible maintenance tradeoffs. I'd suggest waiting until the SPM guys resolve the swift-syntax prebuilt package distribution. Anyway, I hope they are not about to hack SPM's preexisting limitations through compiler flags. |
I've updated he README to say this package no longer works. I've not seen it work with Xcode 16. I may archive the repo. |
Seems Apple is working on a solution https://forums.swift.org/t/compilation-extremely-slow-since-macros-adoption/67921/124 |
@johnno1962 @lyzkov we have a solution at @PreternaturalAI. See swift-precompiled/swift-syntax. |
As we discussed in swift-syntax, a top-level package dependency graph can be patched with:
This can potentially ease swift-syntax replacement with its respective binary version.
The only caveat is that the repository of the mirrored package should contain all tags from the original repository for the SPM to resolve the overridden package.
Since then, the request from the Swift community for
InstantSyntax
has been to maintain all tags from the source package repository.Thank you in advance.
The text was updated successfully, but these errors were encountered: