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

Error when using the extension with asciidoctor.js version 3.0.2 #66

Closed
vigneshmanick opened this issue Aug 8, 2023 · 2 comments
Closed
Labels
wontfix This will not be worked on

Comments

@vigneshmanick
Copy link

Summary

The extension errors out when used with asciidoctor js version 3.0.2

Env setup

npm i -g  asciidoctor &&   npm i -g @asciidoctor/tabs

asciidoctor -V
Asciidoctor.js 3.0.2 (Asciidoctor 2.0.20) [https://asciidoctor.org]
Runtime Environment (node v18.16.1 on linux)
CLI version 4.0.0

Sample adoc

[tabs]
====
Tab A:: Contents of Tab A.

Tab B::
+
Contents of Tab B.

Tab C::
+
--
Contents of Tab C.

Contains more than one block.
--
====

Command

asciidoctor -r @asciidoctor/tabs tabs.adoc

Error

/scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/asciidoctor/node_modules/@asciidoctor/opal-runtime/src/index.cjs:1516
    stubs = stubs.split(',');
                  ^

TypeError: stubs.split is not a function
    at Opal.add_stubs (/scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/asciidoctor/node_modules/@asciidoctor/opal-runtime/src/index.cjs:1516:19)
    at /scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/@asciidoctor/tabs/dist/index.js:11:8
    at Object.<anonymous> (/scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/@asciidoctor/tabs/dist/index.js:257:3)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/@asciidoctor/tabs/lib/extensions.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/@asciidoctor/tabs/lib/index.js:3:20)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Invoker.requireLibrary (/scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/asciidoctor/node_modules/@asciidoctor/cli/lib/invoker.js:128:12)
    at /scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/asciidoctor/node_modules/@asciidoctor/cli/lib/invoker.js:135:29
    at Array.forEach (<anonymous>)
    at Invoker.prepareProcessor (/scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/asciidoctor/node_modules/@asciidoctor/cli/lib/invoker.js:134:20)
    at Invoker.invoke (/scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/asciidoctor/node_modules/@asciidoctor/cli/lib/invoker.js:24:13)
    at Object.<anonymous> (/scratch/blueuser/miniconda3/envs/testtabs/lib/node_modules/asciidoctor/bin/asciidoctor:9:22)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.16.1
@vigneshmanick vigneshmanick changed the title Error when using the extension with asciidoctoJS version 3.0.2 Error when using the extension with asciidoctor.js version 3.0.2 Aug 8, 2023
@mojavelinux
Copy link
Member

This extension is compiled with the version of Opal used to compile Asciidoctor.js 2. I do not plan to maintain two versions of Asciidoctor Tabs for JavaScript. So either Opal needs to be adjusted to produce compatible code for both Asciidoctor.js 2 and 3, or the extension can only be used with Asciidoctor.js 2. I do not plan to work on this, so someone will need to come forward to do the work.

@mojavelinux
Copy link
Member

One possible path forward is that Asciidoctor Tabs 2 will require Asciidoctor.js 3. However, I'm not yet ready to make that transition, so that will not likely happen soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants