Ban all use of/references to the `__SystemLib` namespace outside of builtins
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
### HHVM Version
```
➜ nuxed git:(master) ✗ hhvm --version
HipHop VM 4.0.2 (rel)
Compiler: 1550605031_606999898
Repo schema: a46021ba5e51d676a396f711ef442e334fa9152a
➜ nuxed git:(master) ✗ hh_client --version
hh--4.0.2 Tue Feb 19 20:40:27 2019
➜ nuxed git:(master) ✗
```
### Operating System and Version
irrelevant
### Standalone code, or other way to reproduce the problem
```
namespace __SystemLib;
<<__EntryPoint>>
async function enter_async_entry_point(): Awaitable {
}
```
### Actual result
```
➜ nuxed git:(master) ✗ hh_client foo.hack
No errors!
```
### Expected result
```Error : Cannot redeclare __SystemLib\enter_async_entry_point()```
or better :
```Error : Cannot use `__SystemLib` namespace.```
---
the issue here is that at run-time, you will get this :
```
➜ nuxed git:(master) ✗ hhvm foo.hack
Fatal error: Uncaught Error: Cannot redeclare __SystemLib\enter_async_entry_point() in :
Stack trace:
#0 {main}
```
Contributor guide
Research direction
Start with the provided foo.hack reproduction and compare hh_client's acceptance with hhvm's runtime fatal error. Trace how namespace declarations and the __EntryPoint function are handled in both paths; done means references to __SystemLib outside builtins are rejected before runtime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100