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
Enable GitHub-based remote dependencies #101
Conversation
These changes enable users to specify dependencies that are hosted on GitHub by defining the property `git = ":url"` in the dependency, e.g: ``` std = { git = ":url"} ``` For now the GitHub repo must be public. It also enables users to specify either a branch or a versioned tag along with the git repo, e.g: ``` std = { git = ":url", branch = "my-branch"} ``` and: ``` std = { git = ":url", version = "0.0.1"} ``` As of now, version takes precedence over branch references. These remote dependencies will be installed under `~/forc/`. If no version/branch is specified, it will download the default branch at the latest commit. Future work includes: - A command to check if there are remote changes to the dependency - A command to download updates to the dependencies
} | ||
} | ||
|
||
fn download_tarball(url: &str, out_dir: &str) -> Result<String> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the error messages in this function include the URL/location/agent, etc.? If not, can they be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, will look into that!
The description currently says
Should this be |
Yup, exactly. Was a typo, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but of course now that I merged my PR there are some conflicts but it should be easy to fix it
82b6c98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
As described in #67
These changes enable users to specify dependencies that are
hosted on GitHub by defining the property
git = ":url"
in the dependency, e.g:
For now the GitHub repo must be public.
It also enables users to specify either a branch or a versioned tag
along with the git repo, e.g:
and:
As of now, version takes precedence over branch references.
These remote dependencies will be installed under
~/.forc/
.If no version/branch is specified, it will download the default
branch at the latest commit.
Future work includes:
forc_build.rs
file and creating proper dependency-related abstractions.