JSONPreview icon indicating copy to clipboard operation
JSONPreview copied to clipboard

SwiftLint dependency

Open MarekSlaninka opened this issue 1 year ago • 3 comments

Hello, I have a problem after updating SPM packages in the project, and SwiftLint automaicaly updated to 0.55.1

And I get this error: product 'SwiftLintPlugin' required by package 'jsonpreview' target 'JSONPreview' not found in package 'SwiftLint'.

Coul You please provide some resolution for this issue? Thanks

MarekSlaninka avatar Jun 25 '24 14:06 MarekSlaninka

Hello! 👋

SwiftLint 0.55.0 splits the SwiftLintPlugin plugin into SwiftLintBuildToolPlugin and SwiftLintCommandPlugin. For details, see: https://github.com/realm/SwiftLint/commit/e4e3545b712460509db6bc159838679f7b11b7cc

Currently, the latest version of JSONPreview (2.3.1) uses version 0.54.0 and has not been upgraded to the latest SwiftLint version.

So if you want to solve this problem, it is recommended to fix the SwiftLint version to 0.54.0 in the Package.swift file of your project.

rakuyoMo avatar Jun 26 '24 04:06 rakuyoMo

RakuyoKit contains a general formatting plugin RakuyoKit/swift, and JSONPreview should migrate SwiftLint dependencies to this plugin. This plugin depends on and adapts to the latest SwiftLint version.

If you need SwiftLint version 0.55.0 or higher, please let me know and tell me the latest adaptation time (not as soon as possible), and I will consider updating JSONPreview.

rakuyoMo avatar Jun 26 '24 06:06 rakuyoMo

Hello, thanks for quick reply. I dont need exact version of SwiftLint, but i cannot update packages because it will update SwifLint too. I will try to lock it using xcodeproj SPM manager.

MarekSlaninka avatar Jun 26 '24 07:06 MarekSlaninka

Hello, I just got error on newest Xcode for swiftlint, is there any ETA for updating it in your library? Thanks

MarekSlaninka avatar Aug 07 '24 08:08 MarekSlaninka

Hello, I just got error on newest Xcode for swiftlint, is there any ETA for updating it in your library? Thanks

Could you please try this PR #26? If it works fine, I will merge it and release a new version.

If you have any issues, please let me know which version of Swiftlint and Xcode you are using. I am currently still using 15.3 and have not upgraded to 16 beta.

rakuyoMo avatar Aug 08 '24 03:08 rakuyoMo

Hello, I have a problem, when i select this branch, it will show this error Snímka obrazovky 2024-08-08 o 10 53 09

MarekSlaninka avatar Aug 08 '24 08:08 MarekSlaninka

Hello, I have a problem, when i select this branch, it will show this error Snímka obrazovky 2024-08-08 o 10 53 09

image

I tried using the branch for reference in demo and it worked without any problems.

If you use Package.swift instead of Xcode to manage SPM dependencies, you can try using .package(url: branch:).

.package(url: "https://github.com/RakuyoKit/JSONPreview.git", branch: "feature/swiftlint")

@MarekSlaninka Could you please describe your current environment and operation steps in more detail?

rakuyoMo avatar Aug 08 '24 08:08 rakuyoMo

Im sorry, i got it to work. Its okay, I could also update SwftLint to newest version. Thank You and sorry again

MarekSlaninka avatar Aug 08 '24 11:08 MarekSlaninka

Now that version 2.3.2 has been released

rakuyoMo avatar Jan 17 '25 03:01 rakuyoMo