@@ -302,20 +302,17 @@ extension SymbolGraph.Symbol {
302302 /// or decode that type and thus skips such entries. Note that ``Mixin``s that occur on symbols
303303 /// in the default symbol graph format do not have to be registered!
304304 ///
305- /// `UserInfoValue` is the type of the value in `JSONEncoder.userInfo`. This is generic to support both `Any` and
306- /// `any Sendable` (rdar://145669600) and must be either of these two types.
307- ///
308305 /// - Parameter userInfo: A property which allows editing the `userInfo` member of the
309306 /// `Encoder`/`Decoder` protocol.
310307 /// - Parameter onEncodingError: Defines the behavior when an error occurs while encoding these types of ``Mixin``s.
311308 /// You can log warnings and either re-throw or consume the error.
312309 /// - Parameter onDecodingError: Defines the behavior when an error occurs while decoding these types of ``Mixin``s.
313310 /// Next to logging warnings, the function allows for either re-throwing the error,
314311 /// skipping the erroneous entry, or providing a default value.
315- public static func register< M: Sequence , UserInfoValue > ( mixins mixinTypes: M ,
316- to userInfo: inout [ CodingUserInfoKey : UserInfoValue ] ,
317- onEncodingError: ( ( _ error: Error , _ mixin: Mixin ) throws -> Void ) ? ,
318- onDecodingError: ( ( _ error: Error ) throws -> Mixin ? ) ? )
312+ public static func register< M: Sequence > ( mixins mixinTypes: M ,
313+ to userInfo: inout [ CodingUserInfoKey : Any ] ,
314+ onEncodingError: ( ( _ error: Error , _ mixin: Mixin ) throws -> Void ) ? ,
315+ onDecodingError: ( ( _ error: Error ) throws -> Mixin ? ) ? )
319316 where M. Element == Mixin . Type {
320317 var registeredMixins = userInfo [ . symbolMixinKey] as? [ String : SymbolMixinCodingInfo ] ?? [ : ]
321318
@@ -331,10 +328,7 @@ extension SymbolGraph.Symbol {
331328 registeredMixins [ type. mixinKey] = info
332329 }
333330
334- // FIXME: Remove the `UserInfoValue` generic parameter when we no longer need to build swift-docc-symbolkit in
335- // a configuration that contains https://github.com/swiftlang/swift-foundation/pull/1169 but not
336- // https://github.com/swiftlang/swift/pull/79382.
337- userInfo [ . symbolMixinKey] = ( registeredMixins as! UserInfoValue )
331+ userInfo [ . symbolMixinKey] = registeredMixins
338332 }
339333}
340334
0 commit comments