-
-
Notifications
You must be signed in to change notification settings - Fork 474
Description
What is the problem or limitation you are having?
At present, briefcase dev uses the currently active virtual environment to run a project in developer mode.
However:
- if you don't have an active virtual environment, app dependencies will be installed into the global environment.
- If you use the same virtual environment for multiple projects, it's easy for dependencies to conflict.
- The development environment will include packages (including briefcase itself, and setuptools_scm) that may not exist in the packaged runtime environment, which can lead to inconsistencies.
Describe the solution you'd like
briefcase dev should create and use a standalone virtual environment for development mode. This would ensure that each app has unique and isolated dependencies.
Describe alternatives you've considered
Do nothing.
Additional context
The most notable impact of this approach is that dependencies installed in the briefcase environment will no longer be visible to development mode. This complicates the process of adding dependencies to a project; however, it would be consistent with the behavior of briefcase run - so arguably this is a good thing, as it would avoid the "package X is in my environment, why doesn't briefcase run work" questions.
If this change is made; we may want to consider to additional related changes:
- a
--no-isolationoption that reverts to the current "use the briefcase environment" behavior - a new
briefcase addcommand to manage adding new dependencies
An alternative to (2) would be #1367 (or similar) - i.e., provide better integration with other tools that manage dependencies.
It will also impact on #881/#1714-style build tracking; but likely in a positive way, as isolation will remove some edge cases in keeping the environment current.