Android use out-of-date .so files

Open
#166 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, kotlin, rust

Research direction

Review the mergeDebugJniLibFolders and mergeReleaseJniLibFolders tasks and the $buildDir/rustJniLibs/android path described in the report. Reproduce the stale .so behavior, then verify that changing those files makes the tasks rerun without relying on the outputs.upToDateWhen workaround or the shown cargoBuild dependency.

Written by the indexing model from the issue text.

Description

mergeDebugJniLibFolders and mergeReleaseJniLibFolders will be treated as up to date, even when the .so files change in "$buildDir/rustJniLibs/android".

Chat GPT say it can be fixed if we add this path as input of the task.

workarround:

tasks.whenTaskAdded {
    if (name == "mergeDebugJniLibFolders" || name == "mergeReleaseJniLibFolders") {
        outputs.upToDateWhen { false }
        dependsOn("cargoBuild")
    }
}
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.