Git Product home page Git Product logo

norris's Issues

Crash when I clicked "search" button

Steps to reproduce:

  1. Emulator API 30
  2. Open and run project build
  3. Click "search" icon when app is ready

2021-01-24 20:07:22.019 6280-6280/? E/AndroidRuntime: FATAL EXCEPTION: main Process: io.dotanuki.demos.norris.debug, PID: 6280 java.lang.IllegalStateException: LifecycleOwner io.dotanuki.norris.facts.FactsActivity@807bd3e is attempting to register while current state is RESUMED. LifecycleOwners must call register before they are STARTED. at androidx.activity.result.ActivityResultRegistry.register(ActivityResultRegistry.java:120) at androidx.activity.ComponentActivity.registerForActivityResult(ComponentActivity.java:666) at androidx.activity.ComponentActivity.registerForActivityResult(ComponentActivity.java:675) at io.dotanuki.norris.navigator.Navigator.navigateForResult(Navigator.kt:21) at io.dotanuki.norris.facts.FactsActivity.goToSearch(FactsActivity.kt:70) at io.dotanuki.norris.facts.FactsActivity.onOptionsItemSelected(FactsActivity.kt:62)

Investigate breaking changes with AGP 4.1.x

Context

Seems that AGP 4.1.x introduces some breaking changes this project should catch

  • #74 (by Dependabot)
  • #69 (by Dependabot)
  • #71 (by Dependabot)

Goal

  • Investigate why this happens and make this project compatible with the latest stable AGP
  • Make sure that Detekt and Ktlint are also working with the latest stables

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: File contents are invalid JSON but parse using JSON5. Support for this will be removed in a future release so please change to a support .json5 file name or ensure correct JSON syntax.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

asdf
.tool-versions
  • ktlint 1.2.1
  • detekt 1.23.6
  • maestro 1.36.0
github-actions
.github/actions/setup-android-build/action.yml
  • actions/setup-java v4.2.1
  • gradle/actions v3.3.2
  • gradle/actions v3.3.2
.github/workflows/main.yml
  • actions/checkout v4.1.5@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
  • asdf-vm/actions v3.0.2
  • crate-ci/typos v1.21.0
  • actions/checkout v4.1.5@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
  • nick-fields/retry v3.0.0
  • actions/upload-artifact v4.3.3
  • actions/checkout v4.1.5@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
  • actions/upload-artifact v4.3.3
  • actions/upload-artifact v4.3.3
  • actions/checkout v4.1.5@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
  • asdf-vm/actions v3.0.2
  • actions/download-artifact v4.1.7
  • actions/checkout v4.1.5@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
  • actions/download-artifact v4.1.7
  • asdf-vm/actions v3.0.2
  • actions/upload-artifact v4.3.3
  • actions/checkout v4.1.5@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
  • asdf-vm/actions v3.0.2
  • gradle/wrapper-validation-action v3.3.2
  • actions/download-artifact v4.1.7
  • actions/checkout v4.1.5@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
  • actions/download-artifact v4.1.7
  • EmergeTools/emerge-upload-action v1.1.0
  • actions/checkout v4.1.5@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
  • actions/download-artifact v4.1.7
  • dorny/test-reporter v1.9.1
  • ubuntu 22.04
  • ubuntu 22.04
  • ubuntu 22.04
  • ubuntu 22.04
  • ubuntu 22.04
  • ubuntu 22.04
  • ubuntu 22.04
  • ubuntu 22.04
gradle
gradle.properties
settings.gradle.kts
  • org.gradle.toolchains.foojay-resolver-convention 0.8.0
  • com.gradle.enterprise 3.17.2
build.gradle.kts
app/build.gradle.kts
features/facts/build.gradle.kts
features/search/build.gradle.kts
gradle/libs.versions.toml
  • com.android.tools.build:gradle 8.3.2
  • org.jetbrains.kotlin:kotlin-gradle-plugin 1.9.24
  • com.adarshr:gradle-test-logger-plugin 4.0.0
  • org.jetbrains.kotlin:kotlin-serialization 1.9.24
  • com.dropbox.dropshots:dropshots-gradle-plugin 0.4.1
  • wtf.emulator:gradle-plugin 0.16.2
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.8.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm 1.8.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-android 1.8.0
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.8.0
  • org.jetbrains.kotlinx:kotlinx-serialization-core 1.6.3
  • org.jetbrains.kotlinx:kotlinx-serialization-core-jvm 1.6.3
  • org.jetbrains.kotlinx:kotlinx-serialization-json 1.6.3
  • androidx.core:core 1.13.1
  • androidx.core:core-ktx 1.13.1
  • androidx.activity:activity-ktx 1.9.0
  • androidx.lifecycle:lifecycle-common 2.7.0
  • androidx.lifecycle:lifecycle-runtime-ktx 2.7.0
  • androidx.lifecycle:lifecycle-viewmodel 2.7.0
  • androidx.lifecycle:lifecycle-viewmodel-ktx 2.7.0
  • androidx.appcompat:appcompat 1.6.1
  • androidx.swiperefreshlayout:swiperefreshlayout 1.1.0
  • androidx.coordinatorlayout:coordinatorlayout 1.2.0
  • androidx.recyclerview:recyclerview 1.3.2
  • androidx.test:core 1.5.0
  • androidx.test:core-ktx 1.5.0
  • androidx.test.ext:junit 1.1.5
  • androidx.test.ext:junit-ktx 1.1.5
  • androidx.test:runner 1.5.2
  • androidx.test:rules 1.5.0
  • androidx.test:monitor 1.6.1
  • androidx.test.espresso:espresso-core 3.5.1
  • androidx.test.espresso:espresso-intents 3.5.1
  • com.google.truth:truth 1.4.2
  • com.google.android.material:material 1.12.0
  • com.squareup.okhttp3:okhttp 4.12.0
  • com.squareup.okhttp3:logging-interceptor 4.12.0
  • com.squareup.retrofit2:retrofit 2.11.0
  • com.squareup.radiography:radiography 2.6
  • com.squareup.leakcanary:leakcanary-android 2.14
  • com.squareup.leakcanary:leakcanary-android-instrumentation 2.14
  • com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter 1.0.0
  • app.cash.turbine:turbine 1.1.0
  • io.github.resilience4j:resilience4j-retry 2.2.0
  • io.github.resilience4j:resilience4j-kotlin 2.2.0
  • junit:junit 4.13.2
  • org.slf4j:slf4j-nop 2.0.13
  • org.robolectric:robolectric 4.12.1
  • com.adevinta.android:barista 4.3.0
  • com.dropbox.dropshots:dropshots 0.4.1
  • org.testcontainers:testcontainers 1.19.8
  • org.testcontainers:toxiproxy 1.19.8
  • org.jsoup:jsoup 1.17.2
  • com.squareup.okio:okio 3.9.0
gradle/plugins/settings.gradle.kts
gradle/plugins/build.gradle.kts
platform/android/core-assets/build.gradle.kts
platform/android/core-navigator/build.gradle.kts
platform/android/core-persistence/build.gradle.kts
platform/android/testing-application/build.gradle.kts
platform/android/testing-helpers-espresso/build.gradle.kts
platform/android/testing-persistence/build.gradle.kts
platform/android/testing-screenshots/build.gradle.kts
platform/jvm/core-rest/build.gradle.kts
platform/jvm/testing-helpers/build.gradle.kts
platform/jvm/testing-mockserver/build.gradle.kts
platform/jvm/testing-rest/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7

  • Check this box to trigger a request for Renovate to run again on this repository

Coding style

private fun interpret(interaction: UserInteraction) =
        when (interaction) {
            OpenedScreen, RequestedFreshContent -> ::showFacts
            is NewSearch -> {
                currentQuery = (interaction as NewSearch).query
                ::showFacts
            }
            else -> throw UnsupportedUserInteraction
        }

    private suspend fun showFacts() =
        usecase.search(currentQuery)
            .map { FactDisplayRow(it) }
            .let { rows ->
                FactsPresentation(currentQuery, rows)
            }

with the current arch the app is using. Is there anyway to pass parameter to showFacts like
showFacts(query: String). Look at the code, you have to keep currentQuery as a global field. I don't think that looks good

Add `UseCase` postfix

My understanding is ComposeSearchOptions, FetchCategories, FetchFacts and ManageSearchQuery are UseCases. Can you add the postfix UseCase to make its name more meaningful?

[QUESTION] Domain + UseCase + Livedata

Hey there! First of all, congrats on the job!

A have a little question about architecture stuff.
How would you handle with some observable use case (RxJava or LiveData) on the domain layer?

For example, there is some service updating the data on Room Database, those updates must be sent to the UI.

So basically we have ViewModel connected on some UseCase that is observing the Repository that is observing a Room query.

How would you do these kinds of connection between the layers once the Domain layer is an only Kotlin module, without android dependencies?

Thanks!!

Manage CLI tooling on top of a asdf-compatible version manager

Right now we use a couple of CLI tools and have their version hardcoded in a couple of scripts.

We'd like to extract such hardcoded versions and manage them via a proper .tool-versions file, as per defined by asdf. We could manage with adsf itself or with a compatible tool like rtx

Note that we'd need to implement the support of emulator.wtf-cli and maestro-cli for such versions managers, eventually as new plugins.

Encrypt local files with age

We should evaluate age as an alternative to GPG to drive locally encrypted files. This for sure has impact in both local/CI environments, but eventually drives also a simpler setup for dealing with such files

Optimise storage usage driven by CI cache

After Github introduced better visibility / management to storage used by CI caching, constantly we have to handle messages like this one

image

In addition to that, frequently we blow the 10GB budget, which is a source of cache misses. This is happening due 2 main reasons

  • #651, which doubled the consumption of cache storage based on JDK versions
  • poor cache management, although we are making the most we can of actions/cache

Two solution can contribute to improve the situation

  • stick only to jdk17 when driving CI build
  • replace action/cache with gradle/gradle-build-action, which delivers an implementation that avoids caching by branching and sticks with cache updates / invalidation at default branch level

Code readability

hi I know you've moved to processor recently

 when (interaction) {
            is QueryDefined -> {
                processor.process(
                    CommandTrigger(::save, interaction)
                )
            }
            else -> {
                interpret(interaction)
                    .let { transition ->
                        machine.consume(transition)
                    }
            }
        }

your impl is quite hard to understand. with QueryDefined you use processor, else you use machine.consume(transition). what are the reasons behind?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.