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

[4.2.1] Fails to build with: Value of type '[CodingKey?]' has no member 'compacted' #214

Closed gh123man closed 2 years ago

gh123man commented 2 years ago

Describe the bug

Leaf 4.2.1 fails to build with the error:

Value of type '[CodingKey?]' has no member 'compacted'

on this line: https://github.com/vapor/leaf/blob/main/Sources/Leaf/LeafEncoder.swift#L81 Introduced in: https://github.com/vapor/leaf/commit/04f262edbee143cdfefc5b26cef704913712e16c

Seems like this may be an extension that was not included?

To Reproduce

Steps to reproduce the behavior:

  1. Create a new project
  2. include leaf
  3. try to build

Expected behavior

Should build out of the box.

Environment

Additional context

Add any other context about the problem here.

Workaround: revert back to 4.2.0.

0xTim commented 2 years ago

@gh123man can you run a package update? We probably missed a dependency bump somewhere

gh123man commented 2 years ago

@0xTim Looks like a swift package update fixed it. Thanks 👍