Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[JS] Avoid circular dependencies in apache-arrow

Open
#63 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, rollup, typescript

Research direction

Start with the StackBlitz reproduction and trace the reported cycles through node_modules/apache-arrow/vector.mjs, util/vector.mjs, row/map.mjs, and visitor/get.mjs. Confirm the warning in Rollup, then reorganize the dependencies so the reproduction completes without circular-dependency warnings.

Written by the indexing model from the issue text.

Description

Type: enhancement
Describe the enhancement requested

Currently the apache-arrow library has circular dependencies which cause warnings in tools like rollup:

src/example.js → dist/example.js...
(!) Circular dependencies
node_modules/apache-arrow/vector.mjs -> node_modules/apache-arrow/util/vector.mjs -> node_modules/apache-arrow/vector.mjs
node_modules/apache-arrow/vector.mjs -> node_modules/apache-arrow/util/vector.mjs -> node_modules/apache-arrow/row/map.mjs -> node_modules/apache-arrow/vector.mjs
node_modules/apache-arrow/vector.mjs -> node_modules/apache-arrow/util/vector.mjs -> node_modules/apache-arrow/row/map.mjs -> node_modules/apache-arrow/visitor/get.mjs -> node_modules/apache-arrow/vector.mjs
...and 10 more
created dist/example.js in 890ms

See the following stackblitz which reproduces that build warning: https://stackblitz.com/edit/apache-arrow-circular-dependencies?file=src%2Fexample.js

It would be nice if the library was organized such that circular dependencies could be avoided.

To workaround the warnings in rollup one can use an onwarn handler in the rollup configuration with an implementation like:

const onwarn = (warning, defaultHandler) => {
    const ignoredWarnings = [
        {
            code: 'CIRCULAR_DEPENDENCY',
            file: 'node_modules/apache-arrow'
        }
    ];

    if (
        !ignoredWarnings.some(
            ({ code, file }) => warning.code === code && warning.message.includes(file)
        )
    ) {
        defaultHandler(warning);
    }
};
Component(s)

JavaScript

Dominant language
TypeScript
Stars
112
Forks
23
Avg merge
17h 55m
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-js

All issues in apache/arrow-js

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.