Skip to content

Commit a0a2c97

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 dc18eab commit a0a2c97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hphp/hack/hhi/implicit_context.hhi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ namespace HH {
4848
)[this::CRun, ctx $f]: Tout;
4949
}
5050

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

0 commit comments

Comments
 (0)