The check for existing standalone toolchains is not resilient to missing files

Open
#57 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
38/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
kotlin, python
Domain
build-system

Research direction

Start in GenerateToolchainsTask.kt and inspect the existing standalone-toolchain check and its invocation of make_standalone_toolchain.py. Remove the check so the toolchain is regenerated even when its top-level directory remains after files are removed. Done means --force handles existing contents and builds no longer depend on stale temporary files.

Written by the indexing model from the issue text.

Description

GenerateToolchainsTask.kt checks if the standalone toolchain exists before regenerating it. If some process reaps files from java.io.tmpdir but leaves the top-level directory for that standalone toolchain in place, builds may fail in unpredictable ways. Running make_standalone_toolchain.py is quite fast, so we might consider removing the "already exists" check. --force also takes care of overriding contents properly, so the change is fairly straightforward: just remove the check.

Dominant language
Kotlin
Stars
1.3k
Forks
95
Avg merge
15m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/rust-android-gradle

All issues in mozilla/rust-android-gradle

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.