Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create OngoingRelease status for preview features, set diamond trait …
…reuse to ongoingrelase Summary: This diff adds a new OngoingRelease enum in preview features that turns on unstable feature checking in rust_parser_errors for the runtime but not the typechecker. Once you have a feature in this state, the typechecker will still enforce it. After HHVM is released, you can then remove any use of `check_can_use_feature` for your feature. This will turn off typechecker enforcement. After that, be warned that there may still be file attributes left in www from previewing. Feature implementers will need to clean those up in www first before removing their feature from the UnstableFeatures enum altogether. Reviewed By: francesco-zappa-nardelli Differential Revision: D40182173 fbshipit-source-id: cbdeaa9aefde948d78054d461192ac40712bd25d
- Loading branch information
1 parent
7e52b43
commit dcfea5c
Showing
17 changed files
with
42 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
hphp/hack/test/typecheck/trait_reuse/trait_diamond_no_attribute.php.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
File "trait_diamond_no_attribute.php", line 15, characters 1-30: | ||
Cannot use unstable feature: `method_trait_diamond` (Parsing[1002]) |
20 changes: 20 additions & 0 deletions
20
hphp/test/slow/traits/diamond_use/diamond_trait_with_attribute_good.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?hh | ||
<<file:__EnableUnstableFeatures('method_trait_diamond')>> | ||
|
||
trait MyTrait1 { | ||
public function testFun(): void {} | ||
} | ||
trait MyTrait2 { | ||
use MyTrait1; | ||
} | ||
|
||
<<__EnableMethodTraitDiamond>> | ||
class MyClass { | ||
use MyTrait1; | ||
use MyTrait2; | ||
} | ||
|
||
<<__EntryPoint>> | ||
function foo(): void { | ||
echo "Done!\n"; | ||
} |
1 change: 1 addition & 0 deletions
1
hphp/test/slow/traits/diamond_use/diamond_trait_with_attribute_good.php.expectf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Done! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
hphp/test/slow/traits/diamond_use/diamond_use_no_attribute_2.php.expectf
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters