Remove useless thrift.uris on thrift annotation files

Summary: Every file in `thrift/annotation` defines a package, and yet a lot of the structs also define a `thrift.uri` which is exactly identical to the uri that would be provided by the deafult package + struct name. So just deleting all of those annotations.

Reviewed By: vitaut

Differential Revision: D60529027

fbshipit-source-id: abd76b7cb1b399441252ffdf4cab791fbe537a1a
This commit is contained in:
Filip Francetic 2024-07-31 22:32:46 -07:00 committed by Facebook GitHub Bot
parent 375f1ca0be
commit 5821f934e3
6 changed files with 10 additions and 10 deletions

View File

@ -61,7 +61,7 @@ struct Wrapper {
/// Empty string enables the nested namespace and uses the IDL name for the struct.
2: string underlyingName;
3: string extraNamespace = "thrift_adapted_types";
} (thrift.uri = "facebook.com/thrift/annotation/hack/Wrapper")
}
/// An annotation that applies a Hack adapter to types. For example:
/// @hack.Adapter{name="\\TimestampAdapter"}

View File

@ -49,4 +49,4 @@ namespace py thrift.annotation.internal
@thrift.Experimental
struct InjectMetadataFields {
1: string type;
} (thrift.uri = "facebook.com/thrift/annotation/InjectMetadataFields")
}

View File

@ -57,7 +57,7 @@ struct Adapter {
// Fully qualified name the above implementation adapts to
2: string typeClassName;
} (thrift.uri = "facebook.com/thrift/annotation/java/Adapter")
}
@scope.Field
struct Wrapper {
@ -66,7 +66,7 @@ struct Wrapper {
// Fully qualified name the above implementation wraps to
2: string typeClassName;
} (thrift.uri = "facebook.com/thrift/annotation/java/Wrapper")
}
@scope.Field
struct Recursive {}

View File

@ -78,7 +78,7 @@ struct Adapter {
/// Fully qualified type hint the above implementation adapts to.
/// If ending with "[]", it becomes a generic, and the unadapted type will be filled between the brackets.
2: string typeHint;
} (thrift.uri = "facebook.com/thrift/annotation/python/Adapter")
}
/// Controls cpp <-> python FFI for a struct or union
/// By default, struct uses marshal C API unless cpp.Type or cpp.Adapter is present
@ -88,4 +88,4 @@ struct Adapter {
@scope.Structured
struct UseCAPI {
1: bool serialize = false;
} (thrift.uri = "facebook.com/thrift/annotation/python/UseCAPI")
}

View File

@ -328,7 +328,7 @@ struct Adapter {
// @scope.Transitive, `crate::` will be replaced with the name of the crate in which the
// transitive annotation is defined.
1: string name;
} (thrift.uri = "facebook.com/thrift/annotation/rust/Adapter")
}
@scope.Enum
@scope.Struct
@ -354,7 +354,7 @@ struct Derive {
// @scope.Transitive, `crate::` will be replaced with the name of the crate in which the
// transitive annotation is defined.
1: list<string> derives;
} (thrift.uri = "facebook.com/thrift/annotation/rust/Derive")
}
@scope.Function
@scope.Service
@ -408,4 +408,4 @@ struct ServiceExn {
// }
// ```
1: bool anyhow_to_application_exn;
} (thrift.uri = "facebook.com/thrift/annotation/rust/ServiceExn")
}

View File

@ -109,7 +109,7 @@ struct Const {} (hack.name = "TConst")
// Due to cython bug, we can not use `Enum` as class name directly
// https://github.com/cython/cython/issues/2474
struct Enum {} (thrift.uri = "facebook.com/thrift/annotation/Enum", py3.hidden)
struct Enum {} (py3.hidden)
/** A scope that includes all 'structured' definitions. */
@Struct