Skip to content

building with recursive language dependencies should show a pretty error #2101

@brandondiamond

Description

@brandondiamond

I've been looking into improving the dart language definition; to get started, I built highlight.js locally for dart and received the following error (see below).

After some investigation, it seems that this is caused by the dependency on markdown which, in turn, depends on xml. This appears to be the only dependency chain in the language definition files. I haven't investigated in depth, but it seems that the build tools are currently unable to handle recursive dependencies.

  1 [I] username@username highlight.js> node tools/build.js dart
  2 Starting build.
  3 Copying documentation.
  4 Writing documentation.
  5 Generating demo.
  6 Building highlight.js pack file.
  7 /home/username/githubext/highlight.js/tools/tasks.js:35
  8     if(!object.processed) {
  9                ^
 10 
 11 TypeError: Cannot read property 'processed' of undefined
 12     at pushInBlob (/home/username/githubext/highlight.js/tools/tasks.js:35:16)
 13     at /home/username/githubext/highlight.js/tools/tasks.js:47:9
 14     at arrayEach (/home/username/githubext/highlight.js/node_modules/lodash/lodash.js:516:11)
 15     at Function.forEach (/home/username/githubext/highlight.js/node_modules/lodash/lodash.js:9342:14)
 16     at /home/username/githubext/highlight.js/tools/tasks.js:45:9
 17     at /home/username/githubext/highlight.js/node_modules/lodash/lodash.js:4905:15
 18     at baseForOwn (/home/username/githubext/highlight.js/node_modules/lodash/lodash.js:2990:24)
 19     at /home/username/githubext/highlight.js/node_modules/lodash/lodash.js:4874:18
 20     at Function.forEach (/home/username/githubext/highlight.js/node_modules/lodash/lodash.js:9342:14)
 21     at Queue.tasks.reorderDeps (/home/username/githubext/highlight.js/tools/tasks.js:41:5)
 22     at Queue._dispatch (/home/username/githubext/highlight.js/node_modules/gear/lib/queue.js:101:18)
 23     at Array.<anonymous> (/home/username/githubext/highlight.js/node_modules/gear/lib/tasks/tasks.js:34:18)
 24     at listener (/home/username/githubext/highlight.js/node_modules/async/lib/async.js:493:46)
 25     at /home/username/githubext/highlight.js/node_modules/async/lib/async.js:444:17
 26     at Array.forEach (<anonymous>)
 27     at _each (/home/username/githubext/highlight.js/node_modules/async/lib/async.js:46:24)
 28 

Metadata

Metadata

Assignees

No one assigned

    Labels

    package/buildIssues relating to npm or packaging

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions