Hacker News new | ask | show | jobs
by wwweston 1891 days ago
> cargo install deno

  ...

  Compiling swc_ecma_transforms v0.45.3
  error[E0004]: non-exhaustive patterns: `MaxFilesWatch` not covered
  --> /Users/weston/.cargo/registry/src/github.com-1ecc6299db9ec823/deno_runtime-0.11.0/errors.rs:75:9
     |
  75 |   match error.kind {
     |         ^^^^^^^^^^ pattern `MaxFilesWatch` not covered
2 comments

Admittedly as someone who doesn't code Rust, I have never tried to use cargo to install deno. On macOS I use brew.

brew install deno # works with no issues and much faster

Though, at the bottom of https://deno.land/#installation, one sees the incantation:

cargo install deno --locked

I removed brew's deno, installed rust (via brew) and then tried this. No compile errors. And swc_ecma_transforms compiled successfully.

   ...

   Compiling swc_ecma_transforms_proposal v0.13.1

   Compiling swc_ecma_transforms_optimization v0.15.3

   Compiling swc_ecma_transforms_typescript v0.14.1

   Compiling swc_ecma_transforms_react v0.14.1

   Compiling swc_ecma_transforms v0.45.1

   Compiling gfx-auxil v0.8.0

   ...

   Installing /Users/i034796/.cargo/bin/deno

   Installing /Users/i034796/.cargo/bin/denort

   Installed package `deno v1.9.0` (executables `deno`, `denort`)
brew is nice. I have a rule for myself, though, that if I'm picking up something I'm likely to deploy on an environment that's not my mac, I don't use brew to install it. That can make some things harder up front, but I have my eyes open from the start and get fewer surprises between beta and deployment.

On the other hand, having added `--locked` to the cargo invocation, it works for me now too, so apparently (a) I should look into what that means and (b) I should consider using brew for hints even in situations where I don't intend to rely on it. Thanks!

(On the other other hand, even finding the way through this issue reinforces the point about a certain complexity/opacity to tooling that's supposed to make things easier.)

  % nix-shell -p deno
    these paths will be fetched (18.39 MiB download, 57.83 MiB unpacked):
      /nix/store/vr6lw60nav6kd0qjkb61lbb78mpx4pry-deno-1.8.2
    copying path '/nix/store/vr6lw60nav6kd0qjkb61lbb78mpx4pry-deno-1.8.2' from 'https://cache.nixos.org'...
  [nix-shell:~]$ deno --version
  deno 1.8.2 (release, x86_64-apple-darwin)
  v8 9.0.257.3
  typescript 4.2.2
nix is definitely intriguing