prepack icon indicating copy to clipboard operation
prepack copied to clipboard

Is prepack dead?

Open sandipp opened this issue 4 years ago • 5 comments

I don't see any active development going on here. Is this dead-ended project? Can it be ever be useful for production use?

sandipp avatar Jan 05 '20 21:01 sandipp

@sandipp https://github.com/facebook/prepack#status

s0kil avatar Jan 05 '20 22:01 s0kil

@s0kil thanks for pointing but it's not very elaborative and doesn't tells any specific timeline.

sandipp avatar Jan 06 '20 14:01 sandipp

Could anybody do short write-up of what's missing and what were the biggest challenges, where would you continue if you had time, etc? I was playing with the idea of doing something similar in rust and I think this would help a lot - not just me but also other people interested in the project.

Don't want to be rude but maybe @hermanventer @NTillmann @trueadm could drop a word here? :-)

cztomsik avatar Feb 13 '20 21:02 cztomsik

The short story is that no one currently at Facebook seems to have a scenario in mind where they believe that Prepack can be of use. As such, the project is unlikely to get revived and there seems to be agreement that we should archive it.

The biggest challenge with Prepack is that you need the whole program along with an accurate model of the environment it will run in. Even then, you can only really run it on global code (or code that is known to only depend on state that is set up by the global code and never modified later). This is a very specialized scenario and setting it up properly takes a considerable investment. So far, I am not aware of anyone currently pursuing such a scenario.

Another big challenge is that Prepack is built on top of Babel and requires source code to be lowered by Babel into EcmaScript 5. As JavaScript engines improve in their support for later editions of JavaScript, this limitation will become a performance problem. Updating Prepack to the latest JavaScript edition will be a lot of work. Likewise dropping the Babel dependency will be challenging.

If I had to do it all over, I would stick to my original plan and use Flow as the basis for Prepack.

Right now, however, I'm fully engaged working on a verifier for Rust (see https://github.com/facebookexperimental/MIRAI). If anyone has a scenario for doing Prepack style optimizations based on the heap analysis of MIRAI, please feel free to reach out directly to me ([email protected]) and we can set up a VC to chat about it.

hermanventer avatar Feb 13 '20 22:02 hermanventer

It seems Prepack can only live in a time where ECMAScript really receives what it needed from the beginning: A more descriptive syntax together with static types. But don't we all?

VictorQueiroz avatar Sep 08 '21 03:09 VictorQueiroz