Skip to content

Concurrency-Safe static shortcuts (i.e. Note/NoteClass/Key/etc) #54

@edonv

Description

@edonv

Description

With Swift 6 Concurrency-checking, I get errors/warnings about the shortcuts for Note/NoteClass/Key/etc. (e.g. Note.C, Key.Gm) not being concurrency safe. It says they have "shared mutable state".

Proposed Solution

Because all of these static properties ("shortcuts") are static var/let, they're considered to have shared mutable state. By making them all static computed properties, this wouldn't be a problem.

Describe Alternatives You've Considered

The alternative is to manually initialize these instances, which isn't a huge deal, but it's inconvenient in some cases, especially tests.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions