beeware / beeware/briefcase

Inform user a Briefcase-managed tool is out-of-date and can be upgraded

Open
#1,528 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
3.3k
Forks
549
Avg merge
1d 4h
Merged PRs (30d)
40

Description

### What is the problem or limitation you are having?

Briefcase-managed tools installed in to user's environment can become (potentially quite) out-dated without the user ever being aware. For instance, once a version of JDK 17 is installed, Briefcase will continue using that version indefinitely while a newer user would be using the latest JDK.

Previous discussion: https://github.com/beeware/briefcase/pull/1498#issuecomment-1771609476

### Describe the solution you'd like

Simply check if the version of a Briefcase managed tool is older than what Briefcase would install if it were missing and notify the user to run `briefcase upgrade` to stay up-to-date.

Since Briefcase already depends on the `packaging`, using `packaging.version.Version` to compare versions is rather trivial.

Briefcase downgrades should perhaps be accommodated as well; we could either force a downgrade of the tool or drop a warning that the tool is newer than Briefcase expects...

Tool Analysis:
- Android SDK: non-trivial to check versions....although, `sdkmanager --list` does include an "Available updates" section
- JDK: simply compare installed and expected versions
- linuxdeploy: currently doesn't provide versioning info...
- RCEdit: last release was 2018...and `rcedit-x64.exe -h` for version 1.1.1 says its version is 0.2.0
- WiX: version 3 was last updated in 2019....this would probably only be relevant once we upgrade to WiX 4

This effort would probably only be useful for JDK right now and maybe Android SDK. But creating a simple function that takes two versions and is reusable by an arbitrary tool should be pretty straight-forward to implement.

### Describe alternatives you've considered

Briefcase could maintain stricter requirements on versions for third-party tools....but this is likely to have negative outcomes for people using multiple versions of Briefcase as the tools would be constantly getting re-installed.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Review the prior discussion in pull request 1498 and the existing Briefcase-managed tool handling, starting with JDK version detection and the `briefcase upgrade` entry point. Use `packaging.version.Version` to compare installed and expected versions, then determine how Android SDK updates and newer-than-expected tools should be reported. Done means users are notified when a supported managed tool is out of date without unnecessary reinstalls.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, python
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.