Stability of macro-generated interfaces?

Is there any guidance or expectation of the stability of macro code expansion API declarations?

For example, does the _$ convention introduced by @Observable mean that _$observationRegistrar is unstable and could change in the future, so you should never call it directly from application/library code? Or is it simply underscored to de-emphasize it in autocomplete and document its primary use case as being called from macro-generated code?

My ground assumption for macros would be that the stable interface for a macro is the code you're expected to write to invoke the macro, and that the details of how the macro expands are entirely subject to change, unless the library explicitly provides guarantees about particular symbols existing.

12 Likes