Data: In upgrading from v2.13 to v2.15: broccoli-babel-transpiler is opting out of caching

Created on 6 Sep 2017  路  15Comments  路  Source: emberjs/data

Upgrading ember-data from v2.13 to v2.15 (in addon) with "yarn upgrade ember-data" results in:

broccoli-babel-transpiler is opting out of caching due to a plugin that does not provide a caching strategy:

Probably some dependency needs to be bumped to avoid this.

Doing full "yarn upgrade" fixes the broccoli-babel-transpiler issue but introduces new warning:

"'instrument' is imported from external module 'ember-data/-debug' but never used"

Most helpful comment

Looks like @rwjblue's fix didn't get everything. There is a new pr https://github.com/emberjs/data/pull/5206 that will land in a 2.16.1 sometime tonight or tomorrow.

All 15 comments

I'm experiencing the same issue after upgrading to v2.15 from v2.14.
It seems like the problem is with babel-plugin-transform-es2015-block-scoping...
For some reason, the issue is present in only one of the two projects that I've recently upgraded. I am going to investigate this further this weekend.

This has been fixed in #5114 /w tests...

@xomaczar I still see the issue on ember-data 2.15.2. I get the opting out of caching message.

What's the error/warning?

Can you try 2.15.3

@xomaczar same issue with 2.15.3. It's the same issue this issue says. broccoli-babel-transpiler is opting out of caching due to a plugin that does not provide a caching strategy

Can you share the full output of the warning? It generally includes the actual plugin code after that message (this will help us identify which plugin is causing the caching to be disabled)...

@rwjblue sure thing!

broccoli-babel-transpiler is opting out of caching due to a plugin that does not provide a caching strategy: `function () {
  return {
    visitor: {
      VariableDeclaration: function VariableDeclaration(path, file) {
        var node = path.node,
            parent = path.parent,
            scope = path.scope;

        if (!isBlockScoped(node)) return;
        convertBlockScopedToVar(path, null, parent, scope, true);

        if (node._tdzThis) {
          var nodes = [node];

          for (var i = 0; i < node.declarations.length; i++) {
            var decl = node.declarations[i];
            if (decl.init) {
              var assign = t.assignmentExpression("=", decl.id, decl.init);
              assign._ignoreBlockScopingTDZ = true;
              nodes.push(t.expressionStatement(assign));
            }
            decl.init = file.addHelper("temporalUndefined");
          }

          node._blockHoist = 2;

          if (path.isCompletionRecord()) {
            nodes.push(t.expressionStatement(scope.buildUndefinedNode()));
          }

          path.replaceWithMultiple(nodes);
        }
      },
      Loop: function Loop(path, file) {
        var node = path.node,
            parent = path.parent,
            scope = path.scope;

        t.ensureBlock(node);
        var blockScoping = new BlockScoping(path, path.get("body"), parent, scope, file);
        var replace = blockScoping.run();
        if (replace) path.replaceWith(replace);
      },
      CatchClause: function CatchClause(path, file) {
        var parent = path.parent,
            scope = path.scope;

        var blockScoping = new BlockScoping(null, path.get("body"), parent, scope, file);
        blockScoping.run();
      },
      "BlockStatement|SwitchStatement|Program": function BlockStatementSwitchStatementProgram(path, file) {
 if (!ignoreBlock(path)) {
          var blockScoping = new BlockScoping(null, path, path.parent, path.scope, file);
          blockScoping.run();
        }
      }
    }
  };
}`.

Awesome, thank you! I submitted #5196 to address.

Thanks @rwjblue!

@rwjblue Will this fix be released in ember-data 2.15 or 2.16?

@musaffa This fix should be in Ember Data 2.16.0.

Thanks. I couldn't upgrade to 2.15 because of this issue. This is for the first time I couldn't upgrade.

Looks like @rwjblue's fix didn't get everything. There is a new pr https://github.com/emberjs/data/pull/5206 that will land in a 2.16.1 sometime tonight or tomorrow.

This is fixed for me on 2.16.2. Thanks everyone!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

concertiv picture concertiv  路  4Comments

stefanpenner picture stefanpenner  路  4Comments

graham-sportsmgmt picture graham-sportsmgmt  路  3Comments

kennethlarsen picture kennethlarsen  路  3Comments

NullVoxPopuli picture NullVoxPopuli  路  5Comments