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

jpm support other VCS #631

Closed
andrewchambers opened this issue Feb 9, 2021 · 8 comments
Closed

jpm support other VCS #631

andrewchambers opened this issue Feb 9, 2021 · 8 comments

Comments

@andrewchambers
Copy link
Member

I think the lockfile and also jpm file format is heavily biased towards git. Not sure the best approach to address this, but perhaps at a minimum the lockfile format should have a :kind field or something to disambiguate.

@bakpakin
Copy link
Member

Agreed. I think it would be good to start with something simple like tarball support, but to add more artifact types it becomes needed to start bundling binary code into jpm, or rely on the user having a variety of binaries on their system. On posix it is fine to assume core utils I think, but windows is a different story.

@andrewchambers
Copy link
Member Author

andrewchambers commented Feb 10, 2021

I might be wrong, but i think windows 10 might come with tar and curl now.

@sogaiu
Copy link
Contributor

sogaiu commented Feb 10, 2021

This sort of thing?

https://devblogs.microsoft.com/commandline/tar-and-curl-come-to-windows/
https://techcommunity.microsoft.com/t5/containers/tar-and-curl-come-to-windows/ba-p/382409

@pyrmont
Copy link
Contributor

pyrmont commented Mar 25, 2021

An alternative to adding a :kind key, would be to use the kind of the artefact as the key:

# current
:dependencies [{:repo "https://github.com/joy-framework/joy" :tag "0.5.2"}]

# proposed
:dependencies [{:git "https://github.com/joy-framework/joy" :tag "0.5.2"}
               {:tar "https://example.org/dep.tar"}]

If you have a struct with conflicting keys (e.g. both :git and :tar are defined), jpm could quit with an error. jpm could continue to treat a plain string as a URL to a Git repository. :repo could be deprecated but continue to resolve to a Git repository for backwards compatibility reasons.

As for supporting different tools, jpm could attempt to use the tool associated with the type of artefact (e.g. tar for :tar) and if it's not available, quit with an error.

@bakpakin
Copy link
Member

@pyrmont jpm now supports a :type tag and can get tarballs as well as git repositories.

@pyrmont
Copy link
Contributor

pyrmont commented Jul 16, 2021

@bakpakin I'm looking at janet-lang/jpm and resolve-bundle looks like it supports:

# dictionary
{:repo "https://example.org/dep.tar" :type :tar}

# string
"tar::https://example.org/dep.tar"

Is that right?

@bakpakin
Copy link
Member

Going through my backlog and saw this. @pyrmont , Yes, that is the case here. The string syntax is for command line installs

@pyrmont
Copy link
Contributor

pyrmont commented Aug 26, 2021

Got it. Thanks!

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

No branches or pull requests

4 participants