Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Warning: The .read and .rebuild APIs will stop working in the next Broccoli version #374

Open
oligriffiths opened this issue Sep 6, 2018 · 8 comments

Comments

@oligriffiths
Copy link
Contributor

oligriffiths commented Sep 6, 2018

What

This issue is to help inform Broccoli & Ember-CLI users when they experience this error/warning and to help with the transition.

Why

This warning is presented when broccoli is used with a plugin that is implementing the deprecated .read/.rebuild API.
This API has been deprecated for some time, and will be removed very shortly when we switch to using Broccoli 2.0 in Ember-CLI.

The warning is generated here: https://github.com/ember-cli/broccoli-builder/blob/0-18-x/lib/builder.js#L241-L246

Unfortunately, due to the warning not being presented until build time, the instantiation stack of the plugin is lost, giving few details and limited introspect-ability to the source of the offender.

If you encounter this error after installing a new ember addon, please report the error to the addon author, and ask them to update their addon (or its dependencies).

If you encounter this error after updating ember-cli on an existing project, chances are you or an addon is using an old version of the broccoli-plugin API. Please post your error along with all the ember-addons you are using, and is possible a link to your project repository.

A temporary work around for plugin authors is to use https://github.com/broccolijs/broccoli-read-compat however we STRONGLY encourage you to update your plugin to the latest https://github.com/broccolijs/broccoli-plugin API

Thanks, we hope this journey is smooth.

Deprecated

These packages are deprecated and showing warnings, if there is demand we will put forward fixes:

ef4/ember-browserify

Fixed

Addons/plugins already aware/fixed:

ef4/ember-browserify#130
mainmatter/ember-simple-auth#1615
ember-template-lint/ember-cli-template-lint#345
ember-cli/ember-cli-deprecation-workflow#52
buschtoens/broccoli-flatiron#3
ef4/ember-code-snippet#52
embroider-build/ember-auto-import#52

@stefanpenner
Copy link
Contributor

is ef4/ember-browserify#130 fixed? It seems like it simply may be deprecated, which may not be a good position for folks to upgrade. Thoughts?

@oligriffiths
Copy link
Contributor Author

@stefanpenner updated the description to aware/fixed. If it's deprecated and isn't going to be fixed, could we have a compat mode that uses https://github.com/broccolijs/broccoli-read-compat that people could enable perhaps?

@stefanpenner
Copy link
Contributor

@oligriffiths how about this, if we see folks struggling with it. I'll take some time and make it compatible. (I'm guessing I'll need to do this anyways for work). Could I recommend we create a new section. Deprecated with a description of "these are technically EOL, but if there is demand please share here, and we can do hotfix to ease uprades.

@jrjohnson
Copy link

Just wanted to add ember-cli/ember-cli-deprecation-workflow#52 to the list. It is the actual source of ember-template-lint/ember-cli-template-lint#345 according to ember-template-lint/ember-cli-template-lint#345 (comment)

@piotrpalek
Copy link

piotrpalek commented Sep 20, 2018

Hey it seems that ember-power-select-with-create also causes this issue for me because it relies on (a probably older version of) ember-native-dom-helpers which in turn has an older version of broccoli-templater.

For anyone having this issue, what helped me find out which addons cause this issue was to search in node_modules for broccoli-templater and look for which addons had the 1.x version.

@toreric
Copy link

toreric commented Jul 30, 2019

@oligriffiths Please give me a hint:
... Environment: production [API] Warning: The .read and .rebuild APIs will stop working in the next Broccoli version [API] Warning: Use broccoli-plugin instead: https://github.com/broccolijs/broccoli-plugin [API] Warning: Plugin uses .read/.rebuild API: TemplateCompiler cleaning up... Built project successfully. Stored in " ....

How to start modifying TemplateCompiler, or what? I'm upgrading to ember-cli: 3.4.4 and is a bit confused in this for me rather new environment. I failed in an attempt to convert to yarn for a lot of reasons and had to fall back to bower for a probably 'bug dependency' reason, so it has been a long journey. These remaining errors/warnings should be removed since they may perhaps influence a few other unresolved code malfunctions that remain to work on.

The package.json has got "broccoli": "^3.1.2", and "broccoli-plugin": "^2.1.0",

Another WARNING that is always repeated is missing dependency 'fsevents' but I am not running MacOS but rather Kubuntu x64 (annoying verbose warnings, though).

package.json.txt

@NateDawg90
Copy link

This error occurred in my Ember project after upgrading ember-cli from 3.4.3 to 3.18.0:

ReactFilter: The .read/.rebuild API is no longer supported as of Broccoli 1.0. Plugins must now derive from broccoli-plugin. https://github.com/broccolijs/broccoli/blob/master/docs/broccoli-1-0-plugin-api.md used as input node to Analyzer (ember-auto-import-analyzer) -~- created here: -~- at new Plugin (/Users/nate/Projects/BFCore/frontend/node_modules/ember-auto-import/node_modules/broccoli-plugin/index.js:7:31) at new Analyzer (/Users/nate/Projects/BFCore/frontend/node_modules/ember-auto-import/js/analyzer.js:46:9) at AutoImport.analyze (/Users/nate/Projects/BFCore/frontend/node_modules/ember-auto-import/js/auto-import.js:49:24) at Object.toTree (/Users/nate/Projects/BFCore/frontend/node_modules/ember-auto-import/js/index.js:21:59) at /Users/nate/Projects/BFCore/frontend/node_modules/ember-cli-preprocess-registry/preprocessors.js:188:26 at Array.forEach (<anonymous>) at processPlugins (/Users/nate/Projects/BFCore/frontend/node_modules/ember-cli-preprocess-registry/preprocessors.js:186:11) at module.exports.preprocessJs (/Users/nate/Projects/BFCore/frontend/node_modules/ember-cli-preprocess-registry/preprocessors.js:179:10) at DefaultPackager.processJavascript (/Users/nate/Projects/BFCore/frontend/node_modules/ember-cli/lib/broccoli/default-packager.js:503:29) at DefaultPackager.processAppAndDependencies (/Users/nate/Projects/BFCore/frontend/node_modules/ember-cli/lib/broccoli/default-packager.js:240:35) -~- (end) -~----------------

Please help. I cannot build the project or run ember serve while this exists

@adet4ever
Copy link

I am having the same issue trying to upgrade ember-cli 3.4.3 to 3.18.0
my ember-cli-build looks like this:

....
  var tinymceAssets = new Funnel('bower_components/tinymce', {
    srcDir: '/',
    include: [
      '**/*.min.js',
      '**/*.min.css',
      '**/*.gif',
      '**/*.woff',
      '**/*.tiff',
    ],
    destDir: '/assets/tinymce',
  });

  return app.toTree(tinymceAssets);
};
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: appkit -> ember-bootstrap-datetimepicker -> ember-cli-babel
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: appkit -> ember-bootstrap-datetimepicker -> ember-runtime-enumerable-includes-polyfill -> ember-cli-babel
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: appkit -> ember-cli-zero-clipboard -> ember-cli-babel
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: appkit -> ember-qrcode -> ember-cli-babel
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: appkit -> ember-searchable-select -> ember-cli-babel
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: appkit -> emberx-select -> ember-cli-babel
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: appkit -> emberx-select-blockless -> ember-cli-babel
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: appkit -> emberx-select-blockless -> emberx-select -> ember-cli-babel
DEPRECATION: The integration of jQuery into Ember has been deprecated and will be removed with Ember 4.0. You can either opt-out of using jQuery, or install the `@ember/jquery` addon to provide the jQuery integration. Please consult the deprecation guide for further details: https://emberjs.com/deprecations/v3.x#toc_jquery-apis
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: /home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-bootstrap-datetimepicker/node_modules/ember-cli-babel
WARNING: Invalid Broccoli2 node detected, falling back to broccoli-builder. Broccoli error:
---------------
Object: The .read/.rebuild API is no longer supported as of Broccoli 1.0. Plugins must now derive from broccoli-plugin. https://github.com/broccolijs/broccoli/blob/master/docs/broccoli-1-0-plugin-api.md
used as input node to BroccoliMergeTrees (TreeMerger (vendor))
-~- created here: -~-
    at BroccoliMergeTrees.Plugin (/home/monkey/projects/p30m/phmscli/appkit/node_modules/broccoli-plugin/index.js:7:31)
    at new BroccoliMergeTrees (/home/monkey/projects/p30m/phmscli/appkit/node_modules/broccoli-merge-trees/index.js:16:10)
    at Function.BroccoliMergeTrees [as _upstreamMergeTrees] (/home/monkey/projects/p30m/phmscli/appkit/node_modules/broccoli-merge-trees/index.js:10:53)
    at mergeTrees (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/broccoli/merge-trees.js:90:33)
    at EmberApp.getExternalTree (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/broccoli/ember-app.js:1271:9)
    at EmberApp.toArray (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/broccoli/ember-app.js:1640:12)
    at EmberApp.toTree (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/broccoli/ember-app.js:1766:36)
    at module.exports (/home/monkey/projects/p30m/phmscli/appkit/ember-cli-build.js:83:14)
    at Builder.readBuildFile (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/models/builder.js:52:14)
    at Builder.setupBroccoliBuilder (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/models/builder.js:66:22)
-~- (end) -~----------------

WatcherAdapter's first argument must be an array of SourceNodeWrapper nodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants