Skip to content

InFinite loop when evaluating dependency  #11

@DevVigilante

Description

@DevVigilante

Issue Checklist

  • I confirm that this issue is not a duplicate and hasn't been reported before.
  • I agree to follow the project's code of conduct.
  • I have checked and verified that I am using the latest version of AndroidIDE from GitHub or F-Droid.

Additional terms

  • I understand that providing incomplete or inaccurate information may result in the issue being closed.
  • I agree to provide all requested details promptly for a comprehensive bug report.

Issue explanation

idelog.txt

Expected behavior

Should check if library is already checked or not before checkout it

Error is in AndroidProjectImpl#fillLibrary

  private fun fillLibrary(item: GraphItem, libraries: Map<String, Library>,
    seen: HashMap<String, DefaultLibrary>): DefaultLibrary? {

    val lib = libraries[item.key] ?: return null
    val library = copy(lib)

    for (dependency in item.dependencies) {
      val dep = fillLibrary(dependency, libraries, seen)!!
      library.dependencies.add(dep.key)
    }

    seen[item.key] = library

    return library
  }

Must be something like this

    // Avoid reprocessing if already in 'seen'
    seen[item.key]?.let { return it }

Version name

Version : v2.7.1-beta (27101)
CI Build : true
Branch : dev
Commit : 8c48a0a
Variant : armeabi-v7a (release)
Build type : OFFICIAL
F-Droid Build : false
F-Droid Version : null
F-Droid Version code : -1
SDK Version : 29
Supported ABIs : [armeabi-v7a, armeabi]
Manufacturer : Xiaomi
Device : M2006C3MII

Download source

GitHub

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions