SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

SwiftLint not work with platform=linux/amd64

Open gulivero1773 opened this issue 1 year ago • 4 comments

I download binary file of latest version. If I use FROM --platform=linux/amd64 swift:5.9-jammy in my CI/CD It show to me - error: Tool ‘swiftlint’ is not supported on the target platform

gulivero1773 avatar Mar 29 '24 09:03 gulivero1773

I wonder if it's possible to have a SwiftLintBinary-macos.artifactbundle.zip for Linux?

Having the same issue and using SPM with the build plugin. If possible to create a binary target it would be quite easy to support?

https://github.com/SimplyDanny/SwiftLintPlugins

mikaelbartlett avatar Sep 18 '24 07:09 mikaelbartlett

As for my knowledge, SPM doesn't support binary targets on Linux.

A pre-compiled executable for arm64 on Linux should be possible though.

SimplyDanny avatar Sep 18 '24 16:09 SimplyDanny

Sorry know very little about these bundles....

@SimplyDanny I looked at the following... Maybe these are not the same thing? I've not looked into it much and sorry to waste your time if this is unrelated. https://www.polpiella.dev/binary-targets-in-modern-swift-packages

mikaelbartlett avatar Sep 25 '24 21:09 mikaelbartlett

You're right. This seems to be possible. We could either have a single artifactbundle or two separate ones for macOS and Linux. What's left is the build for the Linux arm64 target.

SimplyDanny avatar Oct 01 '24 16:10 SimplyDanny