aspiers / aspiers/git-deps

Dependency freezing

Open
#128 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
319
Forks
55
PR merge metrics
No merged PRs in 30d

Description

I encountered such error today:

```
Traceback (most recent call last):
File "/Users/jerry/.pyenv/versions/3.9.5/bin/git-deps", line 8, in
sys.exit(run())
File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/cli.py", line 146, in run
main(sys.argv[1:])
File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/cli.py", line 140, in main
cli(options, args)
File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/cli.py", line 123, in cli
detector.find_dependencies(rev)
File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/detector.py", line 103, in find_dependencies
sha1s = [commit.hex[:8] for commit in self.todo]
File "/Users/jerry/.pyenv/versions/3.9.5/lib/python3.9/site-packages/git_deps/detector.py", line 103, in
sha1s = [commit.hex[:8] for commit in self.todo]
AttributeError: '_pygit2.Commit' object has no attribute 'hex'
```

And after some debug I think it's related to the new release of pygit2, which removed `hex` method in its newer versions, ref: https://github.com/libgit2/pygit2/blob/master/CHANGELOG.md I resolved this by installing version 1.10.1

I also encountered this issue: https://github.com/aspiers/git-deps/issues/110 ,which was caused my Werkzeug version is too new and I had to install version 2.0.3 to resolve it

I checked the requirements.txt and found it only has a lower version limit, while I think an upper version limit might be necessary.

Contributor guide

Open the contributing guide

Research direction

Start with requirements.txt and the failing reference at git_deps/detector.py line 103. Reproduce the reported failures with newer pygit2 and Werkzeug versions, then verify that the supported dependency ranges prevent those incompatibilities and that the existing dependency-analysis CLI still runs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.