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

Auto-update dependencies after a git pull #2138

Open
gsingh93 opened this issue Apr 28, 2024 · 1 comment · May be fixed by #2203
Open

Auto-update dependencies after a git pull #2138

gsingh93 opened this issue Apr 28, 2024 · 1 comment · May be fixed by #2203
Labels
enhancement For enhancements to existing features good first issue help wanted

Comments

@gsingh93
Copy link
Member

After doing a git pull, it's possible that there were changes to system dependencies in setup.sh or Python dependencies in pyproject.toml/poetry.lock that need to be updated. If those dependencies don't get updated, things may work fine, or things may break in subtle and hard to reproduce ways. Python dependency updates are much more common than setup.sh updates, so I think this issue should just focus on that.

On startup, pwndbg should check for a file called $PWNDBG_VENV_PATH/poetry.lock.hash or something similar. If it doesn't exist it should create it with with the hash of poetry.lock and run poetry install. If it does exist, it should check if the hash in that file matches the actual hash of poetry.lock. if they differ, run poetry install and update the hash stored in poetry.lock.hash.

For developers, we need to run poetry install -with dev to update dev dependencies. We could maybe store an additional file in $PWNDBG_VENV_PATH marking the user as a developer (created in setup-dev.sh).

The one issue with this is that both normal and dev dependencies are stored in poetry.lock, so if I update a dev dependency the poetry.lock hash will change and poetry install will still get run, even though it wouldn't update anything for regular users. This won't happen very often, and poetry install is pretty fast anyway, so maybe this won't be a problem.

@gsingh93 gsingh93 added enhancement For enhancements to existing features help wanted good first issue labels Apr 28, 2024
@CptGibbon CptGibbon linked a pull request May 31, 2024 that will close this issue
@gsingh93
Copy link
Member Author

gsingh93 commented Jun 8, 2024

Depends on #2219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For enhancements to existing features good first issue help wanted
Development

Successfully merging a pull request may close this issue.

1 participant