RakuyoKit / JSONPreview

🎨 A view that previews JSON in highlighted form, it also provides the ability to format and collapse nodes.
MIT License
68 stars 13 forks source link

SwiftLint dependency #25

Closed MarekSlaninka closed 3 months ago

MarekSlaninka commented 4 months ago

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

rakuyoMo commented 4 months ago

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 commented 4 months ago

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.

MarekSlaninka commented 4 months ago

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 commented 3 months ago

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

rakuyoMo commented 3 months ago

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.

MarekSlaninka commented 3 months ago

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

rakuyoMo commented 3 months ago

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?

MarekSlaninka commented 3 months ago

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