-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Eagerly update app requirements for DevCommand
#1719
base: main
Are you sure you want to change the base?
Conversation
19253a7
to
47a31c1
Compare
For some of the output formats, Briefcase defers installing the app's requirements to the build system.
|
It forces re-writing the requirements.txt file; but that doesn't touch transitive requirements (unless we were to modify Briefcase to output the requirements resolution, rather than just the explicit requirements. That might pair well with a solution to #476. I don't know if the Chaquopy gradle plugin can be forced to do an eager update. AFAIK, it's essentially using a internally vendored fork of pip, so it might be possible - @mhsmith would need to answer that one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see the edge case you're describing, but I'm not 100% convinced whether it's desirable or not.
Consistency with briefcase run
is definitely a compelling argument. However, I'm wary that briefcase dev
is running in a virtual environment that might be shared with other tools. Eagerly updating a transitive dependency could easily have unintended consquences - especially if there's no way to opt out of that mode of update.
For my money, this is almost papering over limitations that would be addressed by a combination of #476 and #431.
Interestingly, one of the possible solutions for #431 is to make dev
use an isolated virtual environment, rather than the one that is running briefcase
. In that context, eager update would absolutely make sense (and be consistent with run
), and would have the additional benefit that pip install
leakage would no longer be an issue - if you don't put a requirement in the requires list, it won't be available.
@mhsmith - Do you have any thoughts here?
This is actually happening at the level of the Chaquopy Gradle plugin – it only reruns pip if the requirements have changed. Any change at all to the requirements file should be sufficient, including a comment. |
This could offer a rationale for inserting a datetime or something similar in
hmm....using the same python environment for disparate projects seems likely to create issues whether we do eager updates or not. But there's no real pressing issue to merge something like this in when other solutions could more holistically address this situation. So, I'll will take a look at those references and see if anything looks doable right now. [edit] Captured Android issue with |
Changes
BuildCommand
, the installation target directory is deleted prior to installing the app's requirements. Effectively, this means the transitive requirements are eagerly updated since the resolver will re-run and determine the latest version to install.BuildCommand
, this updatesDevCommand
to eagerly update the app's transitive requirements when installing its direct requirements.PR Checklist: