-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
SPM can't find swiftlint in build products dir #5032
Comments
I am seeing the same issue. |
I tried a workaround by adding a ln -fs "${BUILD_DIR}/../../SourcePackages/artifacts/swiftlint/SwiftLintBinary.artifactbundle/swiftlint-0.52.2-macos/bin/swiftlint" "/${BUILD_DIR}/${CONFIGURATION}/swiftlint" and even though I couldn't move it before the I checked that the symbolic link gets created, and that it gets created at the correct path, and even successfully executed it from the terminal, but it most probably doesn't work because of the |
I saw this issue on Xcode 14.2 as well, but not when running on Xcode 14.3.1 (using SwiftLint 0.52.2). However, on Xcode 14.3.1 there are severe performance issues, taking around 15 minutes to run in our project. It looked like this PR (a result of this issue) had resolved that, but it seems there could be an issue with Xcode itself that causes the plug-in to take an inordinately long time to run in larger projects (ours has 18 targets). Does Xcode 14.3.1 resolve the issue of the binary being missing for you as well? |
Works on Xcode 14.3 but not Xcode 14.2 for me. |
Thanks for filing an issue here. SwiftLint's SwiftPM plugin integration is outside my area of expertise, maybe @technocidal or @tonyarnold could shed some light on what may be happening here? |
Apologies for the delay in replying, folks. Honestly, this appears to be an issue internal to Xcode. I'm not sure there's much that we can do from outside of Apple beyond some of the beautiful, terrifying build phase hacks (or scheme build pre-actions) for releases of Xcode prior to version 14.3. I would suggest opening Feedback with Apple as a first step, but I'd imagine they're going to ask you to try to update to Xcode 14.3 or newer. |
I'll try with Xcode 14.3 today and close if it works ok |
Works for me now in 14.3, thx! |
New Issue Checklist
Describe the bug
After adding SwiftLint to my project following these directions (I didn't link against the executable & framework products) the SwiftLint plugin cannot appear to find the executable, it assumes its at
/${BUILD_DIR}/${CONFIGURATION}/swiftlint
, I also have swiftlint installed via homebrew but the plugin isn't looking in/usr/local/bin/swiftlint
Complete output when running SwiftLint, including the stack trace and command used
Xcode build output when plugin is run on build (with directory names changed)
Environment
The text was updated successfully, but these errors were encountered: