Skip to content

Commit

Permalink
No longer require file attribute in HHVM for modules
Browse files Browse the repository at this point in the history
Summary:
We'll still require it in the typechecker and still gate the same way via a whitelist for the time being, but this unblocks us from adding modules into systemlib without the ugly file attribute.

Unrelated test timeout:

Reviewed By: oulgen

Differential Revision: D40441753

fbshipit-source-id: 497a13d27308b54b62de65807f0ead5aa71024af
  • Loading branch information
jamesjwu authored and facebook-github-bot committed Oct 19, 2022
1 parent fb6429d commit cb398e7
Show file tree
Hide file tree
Showing 49 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion hphp/hack/src/parser/rust_parser_errors.rs
Expand Up @@ -114,7 +114,7 @@ impl UnstableFeatures {
UnstableFeatures::ExpressionTrees => Unstable,
UnstableFeatures::Ifc => Unstable,
UnstableFeatures::Readonly => Preview,
UnstableFeatures::Modules => Preview,
UnstableFeatures::Modules => OngoingRelease,
UnstableFeatures::ModuleReferences => Unstable,
UnstableFeatures::ContextAliasDeclaration => Unstable,
UnstableFeatures::ContextAliasDeclarationShort => Preview,
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/debugger/modules.php.inc
@@ -1,3 +1,3 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

new module foo {}
2 changes: 1 addition & 1 deletion hphp/test/slow/debugger/modules.php.inc2
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

module foo;

internal class Foo {
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/enum_class/enum_class_internal.inc
@@ -1,3 +1,3 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

new module foo {}
2 changes: 1 addition & 1 deletion hphp/test/slow/enum_class/enum_class_internal.php
@@ -1,6 +1,6 @@
<?hh
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
<<file:__EnableUnstableFeatures("modules")>>

module foo;
internal enum class E : mixed {
int A = 42;
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/autoload-1.inc
@@ -1,5 +1,5 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


new module a {}
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/basic-1.inc
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module B;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/basic-2.inc
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module A;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/basic-3.inc
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module B;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/basic-3.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module A;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/basic-4.inc
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module B;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/basic-4.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module A;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/basic-soft-1.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module A;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/basic-throw-1.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module A;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/basic-throw-4.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module A;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/duplicate-module-1.inc
@@ -1,5 +1,5 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


new module A {}
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/duplicate-module-1.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


new module A {}

Expand Down
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>



<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/instance-properties-incdec.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>



<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/instance-properties-throw-2.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>



<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/instance-properties-throw-3.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>



<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/instance-properties-throw.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>



<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/instance-properties.inc
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

module foo;

class Foo {
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/instance-properties.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>



<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/instance-properties2.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>



<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/instance-properties3.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>



<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/method-cache-1.inc
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module B;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/method-cache-1.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


module A;

Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/module-attribute-1.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>


class Ok implements HH\ModuleAttribute {
public function foo(): string {
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/module.inc
@@ -1,3 +1,3 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

new module foo {}
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/module_newtype.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

module foo;
module newtype Foo = FooInternal; // ok
internal class FooInternal {
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/module_newtype_module.inc
@@ -1,3 +1,3 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

new module foo {}
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/module_newtype_outside_module.inc
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

function outside_module(Foo $x) : void {
$x->foo(); // ok
}
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/module_newtype_separate_file.inc
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

module foo;
function separate_file(Foo $x) : void {
$x->foo(); // ok
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/public_toplevel.inc
@@ -1,3 +1,3 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

new module foo {}
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/public_toplevel.php
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

module foo;

public class Foo {}
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/reflection-2.inc
@@ -1,5 +1,5 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


new module B {}
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/reflection-2.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>


<<Ok, Yes>>
new module A {}
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/reflection-3.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module A;

internal function f() {}
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/resolve-1.inc
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module b;

function bar1() { return foo<>; }
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/resolve-1.inc1
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module a;

internal function foo() { echo "in f\n"; }
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/resolve-1.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module b;

<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/resolve-2.inc
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module a;

function bar1() { return foo<>; }
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/resolve-2.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module b;

<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/resolve-throw-1.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module b;

function pp_exn(Exception $e) {
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/resolve-throw-2.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module b;

function pp_exn(Exception $e) {
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/static-inheritance-1.inc1
@@ -1,5 +1,5 @@
<?hh
<<file:__EnableUnstableFeatures("modules")>>

module foo;

internal class Child extends Foo {
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/static-inheritance-1.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module foo;

<<__EntryPoint>>
Expand Down
2 changes: 1 addition & 1 deletion hphp/test/slow/modules/static-inheritance-throw-1.php
@@ -1,6 +1,6 @@
<?hh

<<file:__EnableUnstableFeatures("modules")>>

module foo;

<<__EntryPoint>>
Expand Down

0 comments on commit cb398e7

Please sign in to comment.