Open
Description
Is there an existing issue?
- I have searched existing issues
Build info
- ObjectBox version: 4.1.0-beta.2
- OS: macOS 15.3.1
- Device/chipset: Apple M1 Pro
Steps to reproduce
Entity:
// objectbox: entity
struct Recipe: Identifiable, Codable {
var id: Id = 0
var name: String
}
Generated code:
extension Recipe: ObjectBox.EntityInspectable {
internal typealias EntityBindingType = RecipeBinding
/// Generated metadata used by ObjectBox to persist the entity.
internal static var entityInfo = ObjectBox.EntityInfo(name: "Recipe", id: 1)
internal static var entityBinding = EntityBindingType()
...
}
Compilation Errors:
Static property 'entityInfo' is not concurrency-safe because it is nonisolated global shared mutable state
Static property 'entityBinding' is not concurrency-safe because it is nonisolated global shared mutable state
Expected behavior
The generated code should be compilable.
Actual behavior
Compilation error