hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

type aliasing doesn't allow aliasing Map

Open berle opened this issue 12 years ago • 3 comments

The following snippet should reproduce the error:

<?hh
// Unbound name: Map
type MyType = Map<string, string>;

As far as I can tell, the hhi files are installed correctly, no symlinking or anything. Using the official .deb build.

berle avatar Apr 21 '14 18:04 berle

I can't reproduce this in any environment where I have hhi properly installed. So it looks an awful awful lot like you have not properly installed them. Can you triple-check that

  • the files are copied, not symlinked
  • they are copied into a directory underneath where you have .hhconfig so that the typechecker can find them
  • one of hh_client --show Map or hh_client --show '\Map' outputs a bunch of information about Map (which one you need depends on what build exactly you have) -- if that fails, try with Exception -- if the hhi files are installed these classes should be known and dump info
  • hh_client restart doesn't help
  • there are no other errors produced; errors can cascade or mask others, so we often don't try to carry on after hitting one error
  • you aren't on NFS, AFS, VirtualBox (Vagrant) shared FS, or any other network or network-ish filesystem where inotify might not work. (hh_client restart should help here, forcing it to pick up changes.)

jwatzman avatar Apr 21 '14 19:04 jwatzman

D'oh. Massive pebkac.

Turns out, I copied the hhi files into the project dir on a machine different from the one where hh_server was actually running due to my somewhat convoluted development setup. Closing this. :)

berle avatar Apr 21 '14 19:04 berle

Heh -- glad you got it working :)

jwatzman avatar Apr 21 '14 19:04 jwatzman