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
Vendor Github and Supermarket dependencies #959
Comments
Decisions to be done on the URL pattern for github. Option 1
Pro: All in one line, easy to copy Option 2 NPM/bower git resolver pattern: https://docs.npmjs.com/files/package.json
Where refname can be a branch name, tag name, or short/full SHA ref. For git refname see: https://git-scm.com/docs/git-show-ref Pro: All in one line, easy to copy, short, seen in the wild |
The additional elements that are contained and specified are:
In a way, we also have: Option 3
i.e. making it mandatory to specify tag/branch/ref elements manually. Pro: Explicit, minimal Although the last is shaky: - depends:
- { url: github://owner/repo, tag: 1.2.3 } |
It's really hard to decide between these three! However: Option 3 is the only one which doesn't introduce a new syntax that people will depend on. If we can clearly determine a winner between Options 1 and 2 we still have the chance to offer it as a new feature. For now, these two options are not supported and only Option 3 is offered. CC: @chris-rock @stevendanna would love your input. |
Here are some thoughts: Personally, I'm in favor of a path where no heuristics are used to determine the source-type. That is, I'd like to eventually remove the regex-based, "is this a github url?" heuristic we currently have. This would require some deprecation period most likely. Using the Personally, I like this format:
or this:
Forcing the user to specify branch vs tag vs ref ensures that there is never a question about what they are referring to. But, I definitely see the value in having just a single "url" that embeds all the information as that is easy to copy and paste. Overall though, I think someone should just play the role of the decider. This is one of those discussions that can go on forever. |
Lets see what is already there. The following urls are standard git urls as offered by github:
NPM defines:
Note: be aware that npm is not using a real URL for github, gitlab and bitbucket. I'd like to mention, that we need to distinguish between public github and any other git repo (also Github Enterprise). It's very likely that we would want to offer urls like I prefer the pure url syntax. We can reuse existing parser and do not need to reinvent the wheel. I still like the current github fetcher, where users just copy paste http urls from github and get it running. I get the point that this requires some heuristics, but its improving the customer convenience. I really like the npm-like syntax (option 2), where we use a real url style. Sidenote: Bundler is using option 3 http://bundler.io/git.html |
Another solution we could take: we use github urls from the browser for github (as the current github fetcher is doing):
and use standard git urls for everything else:
The advantage is, that we use the existing github urls, they allow easy copy & paste. There would be no need for a new syntax then |
Git fetcherIn
With these options:
The git fetcher uses real-life Github fetcherIn
Github is translated into GIT-fetcher urls!. These options are supported for the github fetcher(only!!):
Supermarket fetcherIn
Supermarket is translated into the URL fetcher (as it currently does not support version enumeration and uses fixed URLs!!). Private supermarket is supported:
URL fetchersThe default URL fetcher has special handling for GitHub URLs. Reasoning: Users want to specify these URLs but they point to a site instead of archives. These URLs are supported in
@stevendanna @chris-rock Decision for the UX of this feature for the 1.0 release. |
Part of #888
Always pull the latest possible release. The user may specify the branch, which results in the latest commit in that branch. The user may also specify a fixed tag or commit.
(Version resolution via semver over tags is not a part of this ticket)
User interface:
The text was updated successfully, but these errors were encountered: