pitt500 / SwiftAndTipsMacros

A list of Swift Macros to make your coding live on Apple ecosystem simpler and more productive.
MIT License
89 stars 7 forks source link

add support for optional types #2

Closed nadavbarlev closed 10 months ago

nadavbarlev commented 11 months ago

Currently, when using the macro on a struct with a member of an optional type, like -

@SampleBuilder(numberOfItems: 10, dataGeneratorType: .random)
struct Follower {
  let username: String
  var avatarUrl: String?
}

I encounter the following error: 'Failed to receive a result from the plugin (from the macro 'SampleBuilder')'.

pitt500 commented 11 months ago

Hi @nadavbarlev , thanks for reporting this issue. Currently I got sick but I will take a look in a couple of days.

Feel free to send a PR if you find the issue yourself 👍

Regards, Pitt

pitt500 commented 10 months ago

Thank you for your feedback @nadavbarlev. The issue was fixed and SampleBuilder now supports Optionals! 🚀