From d832512151f8a72759b400e1e86941f0312e5022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Szab=C3=B3?= Date: Sat, 2 Aug 2025 15:43:49 +0200 Subject: [PATCH] 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 --- hphp/hack/hhi/implicit_context.hhi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hphp/hack/hhi/implicit_context.hhi b/hphp/hack/hhi/implicit_context.hhi index 4946fa70cc4ec2..a0a9d49197908c 100644 --- a/hphp/hack/hhi/implicit_context.hhi +++ b/hphp/hack/hhi/implicit_context.hhi @@ -48,7 +48,8 @@ namespace HH { )[this::CRun, ctx $f]: Tout; } - <<__Sealed(FBMemoSensitiveImplicitContext::class)>> + // Avoid referencing an internal class in OSS. + <<__Sealed(FBMemoAgnosticImplicitContext::class)>> // @oss-disable abstract class MemoSensitiveImplicitContext extends ImplicitContextBase { abstract const type TData as IPureMemoizeParam;