8000 Feature/source git by ruben-arts · Pull Request #137 · prefix-dev/rattler-build · GitHub
[go: up one dir, main page]

Skip to content

Feature/source git #137

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

Merged
merged 8 commits into from
May 3, 2023
Merged

Feature/source git #137

merged 8 commits into from
May 3, 2023

Conversation

ruben-arts
Copy link
Contributor

Add git as a source for the package building as specified here

What is still missing is git-lfs integration and git_depth cloning.

@ruben-arts ruben-arts requested a review from wolfv May 1, 2023 14:48
@@ -129,8 +132,84 @@ async fn url_src(
Ok(cache_name)
}

fn git_src(_source: &GitSrc) {
todo!("Git source support not implemented yet!");
/// Fetch the repo and its specific refspecs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you document how it works with the src_cache dir?

@wolfv
Copy link
Member
wolfv commented May 2, 2023

I think cloning with depth is still a bit out: libgit2/libgit2#6396

In general, I am wondering if we should use git2 or just invoke git on the command line. The reasoning for the latter:

  • Is probably configured properly with SSH keys etc. (e.g. in Github Actions, local computers, ...)
  • Super widely used & available
  • It's what conda-build does
  • No additional dependencies means smaller install size of rattler-build

On the other hand, using git2 means:

  • no dependencies on host needed
  • potential interesting future possibilities ... e.g. when we need to search for older recipes in repositories or things like that
  • more control, probably!?

Regardless, I'm happy to merge this PR once we have a little more documentation (I would like to understand how / if the source_cache works with git repositories).

@ruben-arts
Copy link
Contributor Author

I am wondering if we should use git2 or just invoke git on the command line.

@wolfv I'm also not sure. I continued this direction to hopefully avoid OS-specific differences in the cli. Plus the error handling is probably easier as now you just have everything in rust. But I get what you saying. I could try to redo it in another branch to see if that would work better.
@baszalmstra @tdejager do you guys have an opinion?

@baszalmstra
Copy link
Contributor

I think cargo is also originally using git2 so Im pretty sure it will work more than good enough for our usecase. So I would just stick to that.

However, I read somewhere that cargo is moving to gix. I think its behind a feature flag atm.

@wolfv
Copy link
Member
wolfv commented May 2, 2023

The cargo use case is a little bit different from ours -- packages that are git-able with cargo are usually also very compatible with cargo (since they are cargo packages as well) while we might have to deal with clunky C++ behemoth repos from the before times :)

@wolfv wolfv merged commit 1ac7305 into main May 3, 2023
@wolfv wolfv deleted the feature/source_git branch May 3, 2023 18:27
@ruben-arts ruben-arts linked an issue May 4, 2023 that may be closed by this pull request
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.

Implement git depth and git lfs features
3 participants
0