cibernox / ember-ast-helpers

Utility belt to level-up your Ember AST transforms
MIT License
40 stars 6 forks source link

Upgrade to glimmer-vm@0.36.2? #23

Open jdurand opened 6 years ago

jdurand commented 6 years ago

I started seeing issue https://github.com/emberjs/ember.js/issues/16269 quite often in my production logs yesterday when I upgraded from ember-source@3.1.1 to ember-source@3.3.2. A fix (https://github.com/emberjs/ember.js/pull/16286) was released in glimmer-vm@0.32.1 but ember-font-awesome uses ember-ast-helpers@0.3.5 which locks @ember/compiler to ^0.27.0.

Is there a reason why this is locked to glimmer 0.27.x ?

musaffa commented 6 years ago

From version 0.4.0 ember-ast-helpers doesn't depend on any glimmer dependency.

jdurand commented 5 years ago

As mentioned in https://github.com/emberjs/ember.js/issues/16269 I'm running ember-ast-helpers@0.4.0 & glimmer@0.35.10, but I'm still getting Operand over 16-bits errors.

@musaffa @cibernox any cue on what's going on?

Thanks.

musaffa commented 5 years ago

Are you using any dependency that depends on ember-ast-helpers@<0.4.0? Are you using ember-fontawesome?

jdurand commented 5 years ago

No, I'm using a fork of ember-font-awesome which depends on ember-ast-helpers@0.4.0.

The relevant parts of my yarn.lock:

"ember-font-awesome@git://github.com/jdurand/ember-font-awesome":
  version "4.0.0-rc.4"
  resolved "git://github.com/jdurand/ember-font-awesome#f948ca85628b499267f225f652fd1f23da772198"
  dependencies:
    "@ember-decorators/argument" "^0.8.13"
    "@ember-decorators/babel-transforms" "^2.0.1"
    broccoli-filter "^1.2.4"
    broccoli-funnel "^2.0.1"
    chalk "^2.3.0"
    ember-ast-helpers "^0.4.0"
    ember-cli-babel "^6.11.0"
    ember-cli-htmlbars "^2.0.2"
    font-awesome "^4.7.0"
    fs-readdir-recursive "^1.1.0"
    postcss "^6.0.14"
    sync-disk-cache "^1.3.2"
ember-ast-helpers@^0.4.0:
  version "0.4.0"
  resolved "https://registry.yarnpkg.com/ember-ast-helpers/-/ember-ast-helpers-0.4.0.tgz#38e268b984b7716f3c0e0fb00e8ea2c8e794a2d2"
"@glimmer/compiler@^0.35.1":
  version "0.35.10"
  resolved "https://registry.yarnpkg.com/@glimmer/compiler/-/compiler-0.35.10.tgz#ea830a984ced7fe68dd5e96f21127f76ad22c35c"
  dependencies:
    "@glimmer/interfaces" "^0.35.10"
    "@glimmer/syntax" "^0.35.10"
    "@glimmer/util" "^0.35.10"
    "@glimmer/wire-format" "^0.35.10"

"@glimmer/di@^0.2.0":
  version "0.2.1"
  resolved "https://registry.yarnpkg.com/@glimmer/di/-/di-0.2.1.tgz#5286b6b32040232b751138f6d006130c728d4b3d"

"@glimmer/interfaces@^0.35.10":
  version "0.35.10"
  resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.35.10.tgz#1ec18cf7bbcbe42547dd2e131b565a2f71234e3c"
  dependencies:
    "@glimmer/wire-format" "^0.35.10"

"@glimmer/resolver@^0.4.1":
  version "0.4.3"
  resolved "https://registry.yarnpkg.com/@glimmer/resolver/-/resolver-0.4.3.tgz#b1baae5c3291b4621002ccf8d7870466097e841d"
  dependencies:
    "@glimmer/di" "^0.2.0"

"@glimmer/syntax@^0.35.1", "@glimmer/syntax@^0.35.10":
  version "0.35.10"
  resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.35.10.tgz#8f50dfd841487c469ad5d94cd01b425a51a9ab32"
  dependencies:
    "@glimmer/interfaces" "^0.35.10"
    "@glimmer/util" "^0.35.10"
    handlebars "^4.0.6"
    simple-html-tokenizer "^0.5.5"

"@glimmer/util@^0.35.10":
  version "0.35.10"
  resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.35.10.tgz#2a25fa5c3d2b6114bbb07fd57c6e52abd9d088c3"

"@glimmer/wire-format@^0.35.10":
  version "0.35.10"
  resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.35.10.tgz#8445d51923ccbc6a923d2a911f37c82cc390c2e6"
  dependencies:
    "@glimmer/util" "^0.35.10"

Thanks.

musaffa commented 5 years ago

Instead of using the forked repo, you could just use the resolution feature of yarn in your package.json:

  "resolutions": {
    "ember-font-awesome/**/ember-ast-helpers": "^0.4.0"
  }

I'm also using this resolution feature with @fortawesome/ember-fontawesome. If the above method doesn't work for you, you can switch to the official ember component library of fontawesome. It's working for me.

jdurand commented 5 years ago

Right; thanks for the trick, but the fork also addresses a change in implementation for ember-ast-helpers@0.4.0.

I looked at @fortawesome/ember-font awesome a few months ago for Font Awesome 5 support, but it requires too many changes for my immediate need and I don’t think that’s where the issue is.