Skip to content

Conversation

@AkashNegi1
Copy link

moved dependencies which are only required while testing and development and not in runtime to dev dependencies

dependencies which are moved:
photo_2024-07-11_01-55-56

@github-actions
Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

In the case of PARQUET issues on JIRA the title also supports:

PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@trxcllnt
Copy link
Contributor

These are indeed runtime dependencies.

@domoritz domoritz closed this Jul 10, 2024
@universalmind303
Copy link

universalmind303 commented Jul 11, 2024

@trxcllnt These only appear to be runtime dependencies of the example cli application, not the library. Most consumers of 'apache-arrow' are using it as a library, and this brings in a lot of additional unnecessary dependencies.

apache/arrow-js#55

I did a bit of inspection, and the only dependency of the library apache-arrow is flatbuffers. If nothing else, the example cli application should be it's own package with it's own dependencies so users of the library arent forced to import said dependencies.

@domoritz
Copy link
Member

The cli isn't an example only, though. Yes, we could refactor the package to reduce download sizes. Right now we are at <10mb, though: https://packagephobia.com/result?p=apache-arrow.

@domoritz
Copy link
Member

Actually, seems like it's only 2.9MB and the biggest one is @types/node

cost-of-modules

Making sure dependencies are installed
npm install --production

npm warn config production Use `--omit=dev` instead.

changed 3 packages in 4s

Calculating...


┌───────────────────────────┬────────────┬───────┐
│ name                      │ children   │ size  │
├───────────────────────────┼────────────┼───────┤
│ @types/node               │ 0          │ 1.99M │
├───────────────────────────┼────────────┼───────┤
│ flatbuffers               │ 0          │ 0.27M │
├───────────────────────────┼────────────┼───────┤
│ @swc/helpers              │ 0          │ 0.22M │
├───────────────────────────┼────────────┼───────┤
│ command-line-args         │ 0          │ 0.13M │
├───────────────────────────┼────────────┼───────┤
│ command-line-usage        │ 0          │ 0.13M │
├───────────────────────────┼────────────┼───────┤
│ tslib                     │ 0          │ 0.08M │
├───────────────────────────┼────────────┼───────┤
│ json-bignum               │ 0          │ 0.02M │
├───────────────────────────┼────────────┼───────┤
│ @types/command-line-usage │ 0          │ 0.01M │
├───────────────────────────┼────────────┼───────┤
│ @types/command-line-args  │ 0          │ 0.00M │
├───────────────────────────┼────────────┼───────┤
│ 9 modules                 │ 0 children │ 2.86M │
└───────────────────────────┴────────────┴───────┘

@universalmind303
Copy link

Even if the impact is relatively small, there is no good reason for them to be there for consumers of the 'apache-arrow' library. I think it's worth the effort to either refactor, or make them into dev dependencies.

@domoritz
Copy link
Member

I think we would have a breaking change when we remove the CLI from the public API. I am okay with that and would be happy to review a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants