Skip to content

Commit bc384ba

Browse files
committed
Remove internal type from __Sealed attribute in implicit_context.hhi
D74667088 marked MemoSensitiveImplicitContext as __Sealed, with only a single class permitted to directly extend it. This class is however internal to Meta, causing typechecking errors in OSS Hack. As a fix, mark the attribute with `// @oss-disable` to remove it during the code export process. NOTE: If I'm understanding the docs[1] for `@oss-disable` / `@oss-enable` correctly, this should be the correct way to make this change, which should then transform into `// @oss-disable FBMemoAgnosticImplicitContext::class` once this patch is merged and exported. Let me know if this assumption is incorrect. [1] https://github.com/facebook/buck2/blob/239ab927a5be7dee3035141d29e2e9c91e8ea771/HACKING.md?plain=1#L168
1 parent 3fe93d7 commit bc384ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hphp/hack/hhi/implicit_context.hhi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ namespace HH {
3535

3636
} // namespace ImplicitContext
3737

38-
<<__Sealed(FBMemoAgnosticImplicitContext::class)>>
38+
// Avoid referencing an internal class in OSS.
39+
<<__Sealed(FBMemoAgnosticImplicitContext::class)>> // @oss-disable
3940
abstract class MemoAgnosticImplicitContext extends ImplicitContextBase {
4041
final protected static async function runWithAsync<Tout>(
4142
this::TData $context,
@@ -48,7 +49,8 @@ namespace HH {
4849
)[this::CRun, ctx $f]: Tout;
4950
}
5051

51-
<<__Sealed(FBMemoSensitiveImplicitContext::class)>>
52+
// Avoid referencing an internal class in OSS.
53+
<<__Sealed(FBMemoSensitiveImplicitContext::class)>> // @oss-disable
5254
abstract class MemoSensitiveImplicitContext extends ImplicitContextBase {
5355
abstract const type TData as IPureMemoizeParam;
5456

0 commit comments

Comments
 (0)