TheAcharya / MarkerData

The avant-garde Marker extraction application crafted for Final Cut Pro
https://markerdata.theacharya.co
MIT License
22 stars 1 forks source link

[Bug]: Can't able to build the app due to error #78

Closed IAmVigneswaran closed 2 months ago

IAmVigneswaran commented 2 months ago

Marker Data Version?

1.0.0

Architecture

Apple Silicon

macOS Version

No response

Bug Description

@milanvarady Can't able to build the app, due to an error during the building of the App.

https://github.com/TheAcharya/MarkerData/actions/runs/8914758150/job/24482996910

Log excerpt

⚠️  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Utilities/Extensions/DominantColorAlgorithmExtension.swift:11:36: conformance of 'DominantColorAlgorithm' to protocol 'Hashable' was already stated in the type's module 'DominantColors'

extension DominantColorAlgorithm:  Hashable {
                                   ^

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorsExtractorService.swift:13:148: 'Flag' is not a member type of class 'DominantColors.DominantColors'

    static func extract(from cgImage: CGImage, method: ColorExtractMethod, count: Int = 8, formula: DeltaEFormula = .CIE76, flags: [DominantColors.Flag] = []) async throws -> [CGColor] {
            ^

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:17:32: 'Flag' is not a member type of class 'DominantColors.DominantColors'

    var flags: [DominantColors.Flag] {
             ^

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:18:21: cannot call value of non-function type '[Any]'

        var flags = [DominantColors.Flag]()
             ^

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:18:37: type 'DominantColors' has no member 'Flag'

        var flags = [DominantColors.Flag]()
                    ^                    ~~

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:20:27: cannot infer contextual base in reference to member 'excludeBlack'

            flags.append(.excludeBlack)
                     ~~~~~~~~~~~~~~ ^~~~

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:23:27: cannot infer contextual base in reference to member 'excludeWhite'

            flags.append(.excludeWhite)
                         ~^~~~~~~~~~~~

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorsExtractorService.swift:33:71: extra arguments at positions #3, #4 in call

                        let colors = try DominantColors.dominantColors(image: cgImage, algorithm: .iterative(formula: formula), dominationColors: count, flags: flags)
                         ~^~~~~~~~~~~~

⚠️  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Utilities/Extensions/DominantColorAlgorithmExtension.swift:11:36: conformance of 'DominantColorAlgorithm' to protocol 'Hashable' was already stated in the type's module 'DominantColors'

extension DominantColorAlgorithm:  Hashable {
                       ^

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorsExtractorService.swift:13:148: 'Flag' is not a member type of class 'DominantColors.DominantColors'

    static func extract(from cgImage: CGImage, method: ColorExtractMethod, count: Int = 8, formula: DeltaEFormula = .CIE76, flags: [DominantColors.Flag] = []) async throws -> [CGColor] {
            ^

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:17:32: 'Flag' is not a member type of class 'DominantColors.DominantColors'

    var flags: [DominantColors.Flag] {
             ^

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:18:21: cannot call value of non-function type '[Any]'

        var flags = [DominantColors.Flag]()
             ^

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:18:37: type 'DominantColors' has no member 'Flag'

        var flags = [DominantColors.Flag]()
                    ^                    ~~

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:20:27: cannot infer contextual base in reference to member 'excludeBlack'

            flags.append(.excludeBlack)
                     ~~~~~~~~~~~~~~ ^~~~

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorMood.swift:23:27: cannot infer contextual base in reference to member 'excludeWhite'

            flags.append(.excludeWhite)
                         ~^~~~~~~~~~~~

❌  /Users/runner/work/MarkerData/MarkerData/Source/Marker Data/Marker Data/Models/Color Swatch/ColorsExtractorService/ColorsExtractorService.swift:33:71: extra arguments at positions #3, #4 in call

                        let colors = try DominantColors.dominantColors(image: cgImage, algorithm: .iterative(formula: formula), dominationColors: count, flags: flags)
                         ~^~~~~~~~~~~~
IAmVigneswaran commented 2 months ago

I think this is due to the new release of

https://github.com/DenDmitriev/DominantColors/releases/tag/1.1.2

https://github.com/DenDmitriev/DominantColors/tree/update-algoritm?tab=readme-ov-file

IAmVigneswaran commented 2 months ago

@DenDmitriev Any insights on how to resolve this issue?

IAmVigneswaran commented 2 months ago

@milanvarady I have temporarily fixed the build issue.

https://github.com/TheAcharya/MarkerData/commit/4080295d907d8bca07530617a5a2786e390a25f4