denoland / deno_ast

Source text parsing, lexing, and AST related functionality for Deno
https://crates.io/crates/deno_ast
MIT License
148 stars 45 forks source link

Update swc_ecmascript #37

Closed nayeemrmn closed 2 years ago

nayeemrmn commented 2 years ago

https://github.com/denoland/deno/issues/10861 and https://github.com/denoland/deno/issues/12532 have been fixed by https://github.com/swc-project/swc/pull/2530, but swc_ecmascript hasn't been updated in a while.

cc @dsherret

kitsonk commented 2 years ago

See: https://github.com/denoland/deno/issues/12565#issuecomment-972371955

dsherret commented 2 years ago

Not sure how to fix this one... we're blocked on this.

Building deno...
    Updating crates.io index
error: failed to select a version for `indexmap`.
    ... required by package `swc_fast_graph v0.1.0`
    ... which satisfies dependency `swc_fast_graph = "^0.1"` of package `swc_bundler v0.82.0`
    ... which satisfies dependency `swc_bundler = "^0.82.0"` of package `deno_ast v0.6.0 (V:\deno_ast)`
    ... which satisfies path dependency `deno_ast` of package `deno v1.16.2 (V:\deno\cli)`
versions that meet the requirements `^1.7.0` are: 1.7.0

all possible versions conflict with previously selected packages.

  previously selected package `indexmap v1.6.2`
    ... which satisfies dependency `indexmap = "=1.6.2"` of package `deno_core v0.108.0 (V:\deno\core)`
    ... which satisfies path dependency `deno_core` of package `deno v1.16.2 (V:\deno\cli)`

failed to select a version for `indexmap` which could resolve this conflict
bartlomieju commented 2 years ago

I think we have to ask SWC to pin to indexmap =1.6.2 for the time being.

dsherret commented 2 years ago

It seems we can just upgrade to 1.7.0. Everything seems to work when I try that. We'll just have to update the import_map crate.

dsherret commented 2 years ago

Somewhat blocked on https://github.com/swc-project/swc/discussions/2801

dsherret commented 2 years ago

Opened https://github.com/swc-project/swc/issues/2808 -- Right now the REPL is broken because names are getting renamed. If we can't get this working with SWC then maybe we can use the TS compiler instead (which wouldn't be so bad for the repl)

Edit: We should also wait on this one https://github.com/swc-project/swc/issues/2802