vapor / leaf

🍃 An expressive, performant, and extensible templating language built for Swift.
https://docs.vapor.codes/4.0/leaf/getting-started
MIT License
439 stars 81 forks source link

Fix Algorithms Dependency Declaration #222

Closed dankinsoid closed 1 year ago

dankinsoid commented 1 year ago

Swift Algorithms was used in Leaf but never explicitly declared as a dependency on the target. That resulted in compiler errors in some scenarios. The dependency is now correctly declared.

0xTim commented 1 year ago

What version of Swift are you using etc? All CI is working and no one else seems to have reported any errors.

Regardless, we should fix the underlying error but I'd prefer to keep Swift Algorithms. Since it's used elsewhere in the Vapor stack you'll already have this dependency fetched and compiled

dankinsoid commented 1 year ago

@0xTim I use swift 5.7 It compiles fine as a package, but doesn't compile as a dependency of another package (Vapor project in my case), I don't know why 4.2.1 doesn't compile as well, so now I have to use exact: "4.2.0" I change PR to save Algorithms

0xTim commented 1 year ago

Original comment:

My project build failed with 'No such module 'Alghorithms'' error. This is probably due to the fact that the Algorithms were not added to the target "Leaf" dependencies in the Project file

 .target(name: "Leaf", dependencies: [
            .product(name: "LeafKit", package: "leaf-kit"),
            .product(name: "Vapor", package: "vapor"),
        ]),

But as I see in all the code, Algorithms were used only once and not very justified, so I think it's better to remove it until you really need it

VaporBot commented 1 year ago

These changes are now available in 4.2.4