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

Proposal: allow adding npm package as depexts #5690

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

haochenx
Copy link
Member

@haochenx haochenx commented Sep 29, 2023

Status: draft & proposal

What this PR does

@rjbou
Copy link
Collaborator

rjbou commented Sep 29, 2023

Thanks for opening a PR. Usually, it is better to open an issue to open the discussion, like that we can guide you on what is possible and what isn't.

I understand the issue, but for the moment opam depext mechanism relies only on system package managers. There is a proposal to let the user choose its own package manager, and have the depext mechanism based on that instead of the distribution package manager. Once that done, it'll be possible to have filters on package manager, and integrate then npm support.
In the meantime, i'm afraid that there is no solution to install automatically npm packages.

As mentioned in opam repo PR, it is possible to add a conf-bun conf packages, that has a failing post-message Please install bun using that command: xxx.

@haochenx
Copy link
Member Author

Usually, it is better to open an issue to open the discussion, like that we can guide you on what is possible and what isn't.

Ouch, I was creating a parallel issue after this PR, but apparently, the issue didn't get submitted (presumably due to a bad network connection as I was, and am still on travel.) Should I still open the issue or continue the discussion here (I still have the text cached in my browser so it's a matter of clicking the submission button)?

I understand the issue, but for the moment opam depext mechanism relies only on system package managers.

I've figured out that after reading the manual and looking at the source code.

In the meantime, i'm afraid that there is no solution to install automatically npm packages.

Understood.

There is a proposal to let the user choose its own package manager, and have the depext mechanism based on that instead of the distribution package manager. Once that done, it'll be possible to have filters on package manager, and integrate then npm support.

Do you have a reference to it? I did a preliminary search on the issues & prs of https://github.com/ocaml/opam but did not find it. I am happy to help if it may accelerate the process.

As mentioned in opam repo PR, it is possible to add a conf-bun conf packages, that has a failing post-message Please install bun using that command: xxx.

Sure thing. I was at a conference last week and was planning to submit a conf-bunjs package doing exactly that after going back to my office (towards where I'm now traveling.)

@haochenx
Copy link
Member Author

haochenx commented Sep 30, 2023

As the parallel issue I have drafted is broader in scope, I decided to submit it anyway: #5692 🙏

Please feel free to close (this PR or the issue, or both) if it's not the optimal way to do business here.

@haochenx
Copy link
Member Author

PR for conf-bunjs created: ocaml/opam-repository#24557

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

Successfully merging this pull request may close these issues.

2 participants