Kevin Romero Peces-Barba
Kevin Romero Peces-Barba
I think this is now ready for review. Please, let me know about any issues/concerns. BTW I renamed the macro to `@Default` so it is familiar. Let me know what...
Thank you for fixing the typos. > I don't think the `@Default` naming is going to work. The moment you import `DefaultsMacros` in a place that uses the `@Default` property...
OK... I'm a bit confused. When typing out the observation property, since it is lazy Swift doesn't complain about capturing `self`. However, when it's added via macro expansion it does?...
Seems like the compiler is straight up crashing when generating a `lazy var` with a macro ([swiftlang/swift#74087](https://github.com/swiftlang/swift/issues/74087)). Xcode eats the error, but I can see it when using `swift test`...
While there's been no activity about the `lazy` properties in macros, I do have something else to comment on the PR. I was fiddling around with other alternatives, and an...
> Use a [lock](https://github.com/sindresorhus/Defaults/blob/a89f799930c92a85aa04b72131849d46c0833ab3/Sources/Defaults/Utilities.swift#L252) and mark the variable with `@unchecked Sendable`. Thank you for the suggestion, a lock may work. But did you mean to mark the `@Observable` class with...
I've been running the suggestion in my head and I think I'm missing something. I'll try to write down the full issue: - The initial implementation added property accessors to...
Oh hi there, I had not forgotten but I seem to have missed your previous comment with the associated object suggestion, so thanks for the ping. I'll take a look...
@sindresorhus I spent some time (not a lot) and it seems like using the associated objects may work, so I'm trying to put that together. I need to figure out...
Seems like you can just defined the keys as `Void?`, so I made the macro add a private property like such per needed key. Thank you so much for the...