Fixed
Status Update
Comments
il...@google.com <il...@google.com>
th...@outlook.com <th...@outlook.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit afc23fbda873bf19c761bc0f124c99ff4b1a99e9
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Oct 22 15:25:27 2018
Generate correct code for a no argument Kotlin default DAO function.
Kotlin default functions takes 'this' as first parameter and Room
was generating code that passed it but also added a comma thinking
more parameters where to be appended, but on a no arg function, the
comma was kept followed by a closing parenthesis causing wrong code
to be generated.
This change fixes the issue by removing the comma when appending 'this',
but always prefixing a comma on all parameters if the call type is
DEFAULT_KOTLIN.
Bug: 117527454
Test: ./gradlew :room:integration-tests:kotlintestapp:cC
Change-Id: I5792280b85c66f90da3485767e480300ee72bda5
M room/compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
https://android-review.googlesource.com/798412
https://goto.google.com/android-sha1/afc23fbda873bf19c761bc0f124c99ff4b1a99e9
Branch: androidx-master-dev
commit afc23fbda873bf19c761bc0f124c99ff4b1a99e9
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Oct 22 15:25:27 2018
Generate correct code for a no argument Kotlin default DAO function.
Kotlin default functions takes 'this' as first parameter and Room
was generating code that passed it but also added a comma thinking
more parameters where to be appended, but on a no arg function, the
comma was kept followed by a closing parenthesis causing wrong code
to be generated.
This change fixes the issue by removing the comma when appending 'this',
but always prefixing a comma on all parameters if the call type is
DEFAULT_KOTLIN.
Bug: 117527454
Test: ./gradlew :room:integration-tests:kotlintestapp:cC
Change-Id: I5792280b85c66f90da3485767e480300ee72bda5
M room/compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
il...@google.com <il...@google.com> #3
A fox for this issue will be available in Room 2.1.0-alpha02
na...@google.com <na...@google.com> #6
delete
th...@outlook.com <th...@outlook.com> #7
The issue no longer persists in version 2.7.3. Thank you all for the update.
na...@google.com <na...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-fragment:2.8.0-alpha01
androidx.navigation:navigation-runtime:2.8.0-alpha01
Description
Version used: 2.6.0-alpha05 and up (including 2.6.0 stable)
Devices/Android versions reproduced on: Any
In the sample project I try to determine if the home fragment is visible using NavController.visibleEntries. In library version alpha04 it always contains the correct entries, but in alpha05 the list is a hot mess because it keeps growing when navigating and even the host fragment and fragments that are not on the backstack are added to the list. This is not possible in the sample project.
The sample project logs the information for demonstration.