Skip to content

Conversation

@mszabo-wikia
Copy link
Contributor

@mszabo-wikia mszabo-wikia commented Aug 2, 2025

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

@meta-cla meta-cla bot added the CLA Signed label Aug 2, 2025
@facebook-github-bot
Copy link
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D79505213. (Because this pull request was imported automatically, there will not be any future comments.)

@Wilfred
Copy link
Contributor

Wilfred commented Aug 5, 2025

Our HSL CI fails on this diff, I presume because you end up with <<__Sealed()>> which doesn't allow extension at all. Perhaps we should just not seal it in OSS?

@mszabo-wikia mszabo-wikia force-pushed the remove-nonpublic-type-from-sealed branch from 0133deb to a0a2c97 Compare August 5, 2025 13:32
@facebook-github-bot
Copy link
Contributor

@mszabo-wikia has updated the pull request. You must reimport the pull request before landing.

@mszabo-wikia
Copy link
Contributor Author

@Wilfred Thanks, makes perfect sense. Done.

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
@mszabo-wikia mszabo-wikia force-pushed the remove-nonpublic-type-from-sealed branch from a0a2c97 to d832512 Compare October 6, 2025 11:12
@facebook-github-bot
Copy link
Contributor

@mszabo-wikia has updated the pull request. You must reimport the pull request before landing.

@hershel-theodore-layton
Copy link

Hi there @mszabo-wikia 🙂,

Thank you for removing references to these internal names. Making sure these fixes land in upstream is important to all and a right thing to do.

I believe there are two small issues with this PR. I have had to remove two references from this commit, but this PR touches only one.

<<__Sealed(FBMemoAgnosticImplicitContext::class)>>

<<__Sealed(FBMemoAgnosticImplicitContext::class)>> // @oss-disable

This diff also changed FBMemoSensitiveImplicitContext to FBMemoAgnosticImplicitContext. Is that intentional?

hershel-theodore-layton added a commit to hershel-theodore-layton/hhvm that referenced this pull request Nov 2, 2025
Unlike in build 25.7.0, this commit removes the attribute outright.
This seems to be the direction hhvm OSS is going in:
refs facebook#9626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants