Compare commits

...

2 Commits

Author SHA1 Message Date
8442c89944 feat(RES-33): Generation de l'architecture compatible Swift 6 (#13)
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Reviewed-on: #13
2025-04-30 10:22:34 +02:00
57cedd37bb Update rsvgConvertNotFound error to update brew install command line
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
2025-04-08 15:27:10 +02:00
4 changed files with 4 additions and 6 deletions

View File

@ -55,7 +55,7 @@ struct ConfigurationArchitecture: Codable {
func getClass(generateStaticProperty: Bool = true) -> String {
guard children?.isEmpty == false else {
return "class \(classname) {}"
return "final class \(classname): Sendable {}"
}
let classDefinition = [

View File

@ -36,7 +36,7 @@ enum ImagesError: Error {
return "error: [\(Images.toolName)] Getting file attributes of \(filename) failed with error: \(errorDescription)"
case .rsvgConvertNotFound:
return "error: [\(Images.toolName)] Can't find rsvg-convert (can be installed with 'brew remove imagemagick && brew install imagemagick --with-librsvg')"
return "error: [\(Images.toolName)] Can't find rsvg-convert (can be installed with 'brew remove imagemagick && brew install librsvg')"
case .writeFile(let subErrorDescription, let filename):
return "error: [\(Images.toolName)] An error occured while writing content to \(filename): \(subErrorDescription)"

View File

@ -73,7 +73,7 @@ struct ParsedImage {
Images.exit(withError: error)
}
return String(data: data, encoding: .utf8)
return String(decoding: data, as: UTF8.self)
}
func generateImageContent(isVector: Bool) -> AssetContent {

View File

@ -137,9 +137,7 @@ class StringsFileGenerator {
let json = try encoder.encode(rootObject)
if let jsonString = String(data: json, encoding: .utf8) {
return jsonString
}
return String(decoding: json, as: UTF8.self)
} catch {
debugPrint("Failed to encode: \(error)")