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

Import from private repos (via ssh) #77

Closed
MariusCiocanel opened this issue Mar 28, 2019 · 2 comments
Closed

Import from private repos (via ssh) #77

MariusCiocanel opened this issue Mar 28, 2019 · 2 comments

Comments

@MariusCiocanel
Copy link
Contributor

MariusCiocanel commented Mar 28, 2019

I want to start off saying thank you for building swift-sh and all the awesome work you're doing.
Recently I started looking into the Swift Package Manager and then discovered swift-sh.
Eager to try swift-sh out I made a private library installable via SPM and tried importing it in a script using the following syntax:

import Bar  // ssh://git@github.com:mxcl/swift-sh.git ~> 1.0

This format isn't currently supported. Is this something you'd be interested in being included in swift-sh?

I started looking at the regex pattern that parses the import line but I'm not familiar with Regex.

I'll continue to look into it but wanted to raise this issue in case you have any other ideas on how to proceed

@mxcl
Copy link
Owner

mxcl commented Mar 28, 2019

So we try to parse the whole string with URL() if it returns a value, we use it. I guess URL doesn't know this form?

But yes, absolutely want to support this.

@MariusCiocanel
Copy link
Contributor Author

Tried creating an URL() with an ssh address in a Playground and got a valid URL object.
I managed to find a Regex pattern that matches the existing import specification patterns and adds support for ssh addresses. PR coming soon

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

2 participants