Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make briefcase dev update dependencies automatically #881

Open
mhsmith opened this issue Sep 28, 2022 · 2 comments
Open

Make briefcase dev update dependencies automatically #881

mhsmith opened this issue Sep 28, 2022 · 2 comments
Labels
enhancement New features, or improvements to existing features. not quite right The idea or PR has been reviewed, but more work is needed.

Comments

@mhsmith
Copy link
Member

mhsmith commented Sep 28, 2022

Same as #807, but for briefcase dev. It currently installs dependencies only when there's no .dist-info directory, which usually means it'll only do it on the first run.

@mhsmith mhsmith added the enhancement New features, or improvements to existing features. label Sep 28, 2022
@freakboy3742
Copy link
Member

This is a good idea from a UX point of view; forgetting to run dev -d is a bit of a pain. However, the naïve approach of "just turn on -d for every run" isn't ideal either, because running pip install on a list of dependencies that hasn't changed takes a non-trivial amount of time. briefcase dev is a command where execution time matters, so we need to be careful that any mechanism to ensure dependencies are installed doesn't massively slow down the execution experience. As with #807, it might be possible to do something with a hash of pyproject.toml - if you modify pyproject.toml, the hash changes, and briefcase dev tries to install dependencies.

There's also some overlap with #431 - ensuring that you haven't installed a local package and need to add something to your pyproject.toml. However, off the top of my head, I can't think of an obvious hashing target to use for this.

@mhsmith
Copy link
Member Author

mhsmith commented Feb 20, 2023

Last week we talked about the idea of making Briefcase inspect the environment using something like importlib.metadata, and comparing it with the requirements to see whether it needs to re-run pip. But that wouldn't be so simple for requirements that are local directories, sdists, wheels, or Git URLs. So using a hash of the requirements list is probably a better idea.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New features, or improvements to existing features. not quite right The idea or PR has been reviewed, but more work is needed.
Projects
None yet
Development

No branches or pull requests

2 participants