Hack Language Support in PhpStorm Postponed

Hack is a programming language for HHVM by Facebook. Support for Hack has been the most-voted feature request in our PhpStorm issue tracker for quite a while. We have announced in our roadmap that we would investigate the possibility of introducing Hack support in the IDE by PhpStorm 9 release. So here is an update on this.

Our team has conducted a thorough investigation and developed a prototype. We’ve reached a decision to postpone Hack language support in PhpStorm. Let me shed some light on our reasons.

  • We agree with Facebook that it’s not viable to write support for Hack from scratch.
  • We’re unable to deliver the level of functionality & quality expected from an IDE by JetBrains, with the currently available Hack tooling APIs.
  • Official tooling is coming via Nuclide, an IDE by Facebook.

The entire concept of getting Hack in PhpStorm was based on reliance on Hacklang built-in tooling support, including typechecker, reference resolution, and completion, all of which are part of the normal distribution package. Initial prototyping showed that using this approach was feasible, but further we went into development, the more we found it to be unsuitable for anything more serious than experiments.

Why we don’t want to write our own support for Hack

You might ask, “Why doesn’t JetBrains just write their own support for Hack?”. The answer is, “Hack is not PHP.”

We’d have to provide full support for a complete new language, which entails implementing a parser, type checker, navigation, completion, inspections, and so on. No part of PHP support that we have now can be reused for Hack, given the fundamental differences between the languages. We’d then have to maintain and enhance it, closely following the evolution of Hacklang.

All this would require a significant effort from our side, thus delaying other improvements and features that need to be implemented in other subsystems of PhpStorm. This would affect over 300,000 PHP developers using PhpStorm. Given the current adoption rate of Hack, we believe this is a trade-off that we should not rationally make.

With the current Hack tooling API, we’re unable to deliver the level of functionality & quality expected from an IDE by JetBrains

During our initial investigation, we relied on HHVM and Hack tooling running within self-contained Vagrant images, providing users with both runtime and IDE tools (annotations, completion, and so on). That was the only way to bring to all the platforms supported by PhpStorm (as HHVM itself is still not cross-platform), and to have the user environment set up and running with relative ease. Code completion and analysis were quite limited – similar to what Facebook provided for vi and Emacs users, plus some basic navigation. In addition, the way of reaching API services (via command line/SSH) has proved to be unsuitable for anything more serious than experiments, especially from the perspective of editor performance and stability.

We expected that, as our scheduled release approached, Hacklang tooling would mature, the APIs would become more suitable for real-world workloads, and the user experience would improve. Unfortunately that hasn’t been the case. As far as we know, the previously discussed improvement of the initial API is no longer part of HHVM/Hack strategy, and a completely new API to be used by Nuclide is being built. More on that below.

Given our team’s focus on prioritizing performance and editing experience, and despite our desire to bring Hack support into PhpStorm, with the current state of its tooling APIs we’re unable to provide the level of support that would meet either JetBrains’ quality standards or our customers’ expectations.

Official tooling: Nuclide, an IDE by Facebook

Some time ago Facebook announced Nuclide, a unified IDE for Hack/React/Flow. Nuclide is described as a set of packages for Atom editor. All advancements in Hack tooling API seem to be going into those packages. While these are supposed to be reusable by third parties, they have yet to be published, documented and tested for real-world usage.

While we look forward to the final result of Facebook’s effort, so far their focus has seemed to shift from the vision initially discussed. Bringing these services (and their configuration) into the picture would significantly complicate setup for PhpStorm users. As such, this effectively removes any possible integration from the PhpStorm 9 release timeframe.

Given the above, we’ve decided to postpone Hack language support in PhpStorm until either Hack language seems greater adoption or the options for integrating with the original tooling change dramatically.

We hope this answers the most urgent questions you’ve raised about Hack. Let’s live and see how things pan out.

Develop with pleasure!
– JetBrains PhpStorm Team

This entry was posted in General Announcements and tagged , , . Bookmark the permalink.
  • http://www.liplex.de Christian Kolb

    I think this is the right decision! I would hate to see PHPStorm loosing it’s speed in developing new features for PHP because of this. Is there a plan to build a separat IDE for Hack with a additional team?

    • Mikhail.Vink

      There is no current plan to build a separate IDE for Hack – the market of Hack developers is not that big at the moment.

      • Tristan

        The market is not big because no one has made the first move. JetBrains has/had the perfect opportunity to establish themselves as the goto editor for Hacklang. No one is adopting the language because of the lack of tooling — the lack of an IDE. After investing so much time into PHPStorm, we cannot accept non-IDE backed development in a team environment.

        I understand the need to remain focused, but I am severely disappointed by this announcement. My team may be forced to leave the JetBrains ecosystem.

        • http://www.fractalizer.ru Vladislav Rastrusny

          > The market is not big because no one has made the first move

          Can you back that statement by facts? I do not think that every language succeedes, that has IDE. Do you think that Hack will immediately become equal to at least PHP popularity if JetBrains releases IDE for it?

          • pwm

            That’s a bit black and white thinking. It doesn’t have to become equally popular. However that 300K devs currently using PHPStorm would have the option to add type safety to their PHP projectsvia Hack, which would be a huge step forward imho.

          • http://www.fractalizer.ru Vladislav Rastrusny

            JetBrains is a great company. But they do not have unlimited power. What would YOU choose: implement Hack support (used by a very small group of PHPStorm users) and postpone all those great things in the roadmap for others or continue to support PHP?

          • http://about.me/mikeschinkel MikeSchinkel

            PhpStorm does almost everything I currently need for PHP. So I would rather they implement support for Hack, which is something I need but do not have.

          • http://about.me/mikeschinkel MikeSchinkel


            I would happily switch to Hack in a heartbeat if PhpStorm supported it.

            I’m tired of the intransigence of the PHP Internals team a.k.a. the “toxic kindergarden.” And I really like that FB is moving Hack rapidly forward by adding features developers benefit from rather than bikeshedding about them for years. I hate that PHP lags because of the personal whims of selected long-time PHP developers who now have an outsized influence on the decisions related to PHP.

            From the outside it seems the only reason PHP7 is moving forward with many new features is because of competition from Hack, and so enabling Hack to be a better competitor (with PhpStorm support) that is good for PHP developers too.

    • look

      There is no reason I would like to use Hack with specific IDE. Hacklang and PHP can co-exists and for a long time they will live together in real live projects.
      The reason I wanted to see it in PhpStrom i to work the together. There are other tools good for hacklang bun non for both at the same time (with features like phpstrom)

  • Tomáš Marný

    Yes, it can help you to sell your product, but I don’t want gazillion new features. I need only one feature: optimised editor, quick editor. And so far, every version is slower. I do have projects where gui is freezing. And my 8-core 4ghz 32gb ram+ssd is not slow.

    • lucid

      Maybe you have some kind of DPC latency, driver issue, or other problem? I have a mere 4 cores and 16gb of memory and even quite large projects are extremely fast in PhpStorm for me. Comparable to Visual Studio, orders faster than Netbeans.

    • http://thinkscape.pro/ Artur Bodera

      On rMBP (4 core 16GB+SSD) it is varying – some versions are terribly slow (each keystroke is taking ~ 500ms), some versions (i.e. current 141.1534) are fast and responsive. I believe it’s an effect of ongoing changes under the hood.

      Try a different version! (or play with JVM version and settings)

    • Adrian Grund

      OSX or Windows?

  • lucid

    My heart is broken.

    Tons of people want to use hack but don’t want to have to limit their IDE choices to 2 or 3 options to do so. It has become such a chicken-and-egg problem. Nobody uses it because our favorite IDEs don’t support it.

    That said, I’m happy for JetBrains commitment to quality. Hopefully the tooling API will come along soon and this can be promptly revisited.

  • http://www.fractalizer.ru Vladislav Rastrusny

    I think many of us (including me) voted for Hack support not because we are seriously going to develop something using Hack, but just for our favourite IDE to be the BEST. So, I do not think there should be any disappointments in the community.

    Hack is not PHP and it will require HackStorm to fully support its ecosystem. But the number of potential HackStorm customers seems to be very low.

  • Jaroslav Hranička

    Hi PhpStorm Team. And what about PHP 7 support in IDE?

    In current PhpStorm 9 PP is partially supported. PHP 7 final release should be this year (Mid October 2015). Will be PHP 7 support added in PhpStorm 9 via updates when PHP 7 will be released?

    Or full support of PHP 7 won’t be in PhpStorm 9 and we must wait for PhpStorm 10?
    I have PhpStorm 8 license and I’m looking for renewal the license but main reason will be PHP 7 support.

    Thank you!

    • Mikhail.Vink

      That’s hard to say for now, will depend on many factors. As PhpStorm 9 is to be released in July, a couple of following months (as usual) will be spent on bug fixing, performance improvements, etc. Probably some of the PHP 7 features will be added during this time frame, but no promises for now.

      By the time PHP 7 will be released, ongoing PhpStorm 10 EAP should be in place, and we’ll make sure to work on PHP 7 features timely as they mature in PHP 7 builds, and you can see we’ve already got initial support for return type hints as that’s a major one.

      In any way, if you renew your license for PhpStorm 9, you’ll get PhpStorm 10 as well, as every license includes 1 year subscription to updates incl. major version updates.

      • Jaroslav Hranička

        Thank you very much for exhaustive response! :)

  • netpalantir

    The best choice! Thanks for not bloating our IDE with too much stuff. Concentrate on the basics. However, I agree with the person who says that performance improvements are most needed now. I am planning to upgrade my laptop, because working with PHPStorm is becoming increasingly difficult.

  • Terry Cullen

    “We’re unable to deliver the level of functionality & quality expected from an IDE by JetBrains, with the currently available Hack tooling APIs.”
    This. I also asked for hacklang support and six months ago would have moaned about this decision. But, having developed jointly on PHP/HHVM over the last 12 months, Jetbrains is right. The tooling isn’t stable enough to invest a lot on right now. The facebook team has done some truly amazing work on getting HHVM where it is today and it has done a lot for progressing PHP, PHP7 will be an epic step forward. But, yeah, writing hacklang has become slightly less enticing with the new PHP7 features combined with the rock-solid PHP tooling. I’m really excited as to what the facebook team will have for us over the next six months…

    • http://about.me/mikeschinkel MikeSchinkel

      Terry – We are currently considering the use of Hack. Can you elaborate on the specifics of tooling you are referring to as unstable? Thanks in advance.

      • Terry Cullen

        OK.. so everyone’s workflow is different so my comments are about my workflow and the tools I use to build web apps. Additionally, my comments are more relevant to those developers that use feature packed IDEs like phpstorm. I use phpstorm (and all the tooling built in to that), xdebug, phpunit, etc on a mac targeting linux servers. My main complaint was that xdebug wasn’t stable in hhvm and xdebug is critical to how I develop. A month is a long time in this business so maybe things have improved there.

  • Bill Schaller

    I think it’s a good decision for you guys, not just as a business but for the software as well. Hack is not PHP is the meme of the day.

  • http://www.phpexperts.pro/ Theodore R. Smith

    Well, so long, PHPStorm. I guess I will have to use Nuclide since my corporation migrated to hacklang exclusively for all new projects back in January 2015.

  • Haehnchen

    “Our team has conducted a thorough investigation and developed a prototype”. So it would be a nice step to open source your current dev.

    • http://jetbrains.com/webide Alexey Gopachenko

      Actually the initial idea was to make it completely open source so FB and users can maintain it up to date and add features.
      Unfortunately it completely relies on Hacklang’s SSH-based API invocations via our “remote” processes support which is currently closed, and the pain of opening it is very high…

  • Henry Garcia

    As many others have stated performance should be the top priority. Thanks for the awesome product

  • http://phenocode.com/ Andrew Ewing

    This is disappointing, but I have already switched my default working boot to elementary OS so that I can use Nuclide. Luckily, Atom has great support for PHP and JavaScript as well.

  • Rob van Hoose

    Good. Tighten up resources and focus on performance and PhpStorm to stop the tide flowing out to Sublime Text. It’s getting better code intel plug-ins by the day and ‘Storm isn’t getting faster. Slow start up time should be addressed as well as laggy scroll etc. I’m a heavy use of ‘Storm’s integration with debugging, database, git, and code refactoring.. But sublime is just so dang snappy.. Can we get that!? Pretty please?

    • Josh Taylor

      I’ve found the best solution to IntelliJ slowness is getting a better machine to run it on. (Which goes the same for all java apps). i7, oodles of RAM, SSD makes PHPStorm fly. SSD was the biggest change to speed.

      • Rob van Hoose

        Yep, I have an i7 w/ 8GB and SSD. The 9 EAP seems to be doing some things for speed and I hope that continues. It feels lighter and faster. Still, comparing shift-shift fuzzy search to Sublime’s cmd+p fuzzy search — they are close, but that latter is just instantaneous. I like what I’m seeing in 9, though!

        • Josh Taylor

          Sublime is very very fast compared to PHPStorm, but I find the PHPStorm shift-shift search much more powerful.

  • jesseschalken

    The only reason I want to use Hack is for *real* static typing. It would be sufficient if PhpStorm simply implemented static type checks using PhpDoc comments (making sure the return type matches, complaining about an int passed into a string parameter, making sure the things you do with a “Foo|Bar|Baz|null” work with all the possible types, not just one of them, etc etc).

  • https://devedge.eu/ Peter Petermann

    Damn,i was really hoping for this.

    Im probably not hipster enough to be satisfied with atom based solutions.

  • goyote

    Cool, np :) Thanks for the honesty.

    Update: Plus PHP7 is out this year.

  • lol768

    Whilst support for Hack would’ve been nice, I think you’ve made the right decision here. Thanks for writing the blog post to explain it all, too – one of the things I really like about JetBrains is how customers are kept informed about product decisions, bug reports etc.

  • frickenate

    I’d also just like to pitch in and say THANK YOU for not going forward with this. It might have been handy and cool to have been able to support Hack, but the reality exactly matches your emphasis: “Hack is *not* PHP”. By trying to combine both languages into one common IDE, it would have guaranteed compatibility problems and bugs even for non-Hack users, which by and large make up the majority of your customers.

    Thank you for not risking burning your PHP product to the ground. The last thing we need is for every bug and new feature to have to go through time-consuming analysis and development to ensure that both PHP and Hack work properly.

    Please, if this is reconsidered in the future… make a separate HackStorm product. We really don’t need the complications of trying to use PhpStorm for regular PHP and finding bugs or performance degradation introduced due to Hack support.

    Thanks again!

  • Orvid

    I’m sad I missed this announcement until just now, but I do have to ask, how much of a difference would it make if HHVM itself, not hh_client, were able to run on Windows? I’ve been working on my own for the last couple of months to bring HHVM to Windows, and I’m nearing the point where I can actually compile HHVM with MSVC, although I’ll have to wait for the full VS2015 release before I can make that happen, due to some closed source dependencies (Intel Performance Primitives).

    As far as hh_client, goes, it will take significantly less work to get it ported to Windows, primarily just handling the memory model, as it uses `fork` to avoid the ocaml GC, and implementing a couple of C helpers. I made an initial pass to try to do so, and got it to compile at least, but my initial implementation of the shared memory pool didn’t work, and, due to how much of a pain it is to build it on windows in the first place due to issues with ocamlbuild, I didn’t dig much deeper.

    If hh_client were able to run on Windows, how much would that help?