https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
squarelibraries
  • s

    sendoav

    09/30/2019, 9:54 AM
    Hi all, do you know if sqldelight could be shared between two android apps and used simultaneously?
    d
    h
    • 3
    • 4
  • k

    Klara Erlebachova

    10/01/2019, 12:28 PM
    Hi, is there some simple way how to delete sqldelight database file on iOS platform? I need to delete it in tests but so far I succeeded to do it only on Android.
    n
    • 2
    • 2
  • a

    alex.krupa

    10/02/2019, 4:18 PM
    Question regarding https://github.com/cashapp/paparazzi before I dive in. My use case: I’d like to write a task/script to generate screenshots of project’s custom Views/ViewGroups for documentation purposes, without running the app or manually capturing Android Studio’s preview. Is Paparazzi a tool that would potentially help me do that? If not, is there an alternative?
    w
    k
    t
    • 4
    • 10
  • l

    liminal

    10/07/2019, 10:35 PM
    Question about Square Workflow: what are the usecases when you’d choose Stateful vs Stateless workflow? (If your screen saves state using a Snapshot? Something else?)
    z
    r
    • 3
    • 14
  • c

    coletz

    10/08/2019, 6:07 PM
    Hi everyone, someone can confirm that the readme of sqldelight (https://github.com/cashapp/sqldelight) is updated? I updated an old project (from sqldelight 1.0.3 to 1.2.0) and now I don't have the generateSqlDelightSchema task is not added anymore (but i have a task named generateJvmMainMyDatabaseInterface which does nothing)
    e
    s
    c
    • 4
    • 10
  • c

    Cody Engel

    10/09/2019, 5:26 PM
    For SQLDelight has anyone ran into issues with a
    View
    breaking their code gen? (More info in thread)
    • 1
    • 4
  • s

    SrSouza

    10/16/2019, 6:08 PM
    Hi guys, there is a way to make retrofit ignore if the
    @Body
    is null ?
    h
    • 2
    • 3
  • g

    ghedeon

    10/18/2019, 2:46 PM
    Given: Retrofit + Coroutines I'm trying to map http errors to my custom wrappers in a centralized manner. What would be the right approach here? Call Adapter? Any good example of such thing with suspended functions? Thanks.
    d
    • 2
    • 1
  • j

    jishindev

    10/23/2019, 11:52 AM
    Does
    wire 3.0
    not support
    proto3
    ? Seeing this while building the project which has
    proto3
    files.
    Skipped .proto files with unsupported syntax. Add this line to fix:
      syntax = "proto2";
    j
    • 2
    • 2
  • j

    jw

    10/31/2019, 7:50 PM
    Use an in-memory DB? This will start fresh from each test
    n
    • 2
    • 1
  • p

    Paul Woitaschek

    11/11/2019, 4:11 PM
    Hm; that's complicated. I refactored all my repo functions to be presented by an
    sealed class Action
    . Now I have sth like:
    suspend fun run(actions : List<Action>){
        withContext(<http://Dispatchers.IO|Dispatchers.IO>){
          db.transaction {
            actions.forEach { action ->
              when (action) {
                is Action.Delete -> queries ...
              }
            }
          }
        }
      }
    Does that make sense?
    d
    • 2
    • 2
  • p

    Paul Woitaschek

    11/12/2019, 11:03 AM
    Is there a way to force moshi to have all fields annotated with
    Json(name...)
    ? I hate the implicit contract between field naming and json representation. I'm always triple-checking that I don't rename something that gets serialized.
    t
    • 2
    • 4
  • m

    myanmarking

    11/15/2019, 4:42 PM
    do we need to specify Dispatchers.IO to call retrofit suspend methods ? It appear it uses Call<>, which uses its own scheduler. Am i right ?
    z
    • 2
    • 1
  • c

    Chainchelliah

    11/20/2019, 5:05 AM
    Ok jake 👍
    b
    • 2
    • 1
  • j

    Jan Stoltman

    12/05/2019, 3:19 PM
    Is there any ETA for new release of sqldelight? With kotlin 1.3.60 support
    p
    • 2
    • 4
  • p

    Paul Woitaschek

    12/09/2019, 12:37 PM
    Why is the generated json adapter using reflection for classes with default parameters? I have crashes at runtime because the codegen is apparently using reflection now and proguard stripped it.
    🤔 1
    b
    f
    • 3
    • 6
  • b

    Ben Tseytlin

    12/09/2019, 7:58 PM
    hey, I’m looking into serializing a Kotlin Redux State(data + sealed classes) on Android using Moshi. We have many individual screens resulting in 1+ sealed classes for each screen. This results in needing to add more and more adapters to this general Moshi state serializer. I’m curious as to why Moshi (and even GSON has this hurdle) requires manual creation of these individual PolymorphicJson adapters I’d love to take advantage of codegen or reflection but that doesn’t seem to be an option here so that the implementation of state serialization can be as “out of the box” as possible for future developers who are adding into the app. Has anyone serialized a large number of sealed classes in a way that doesn’t require adding tons of adapters?
    g
    • 2
    • 2
  • i

    Ive Vasiljevic

    12/13/2019, 11:05 PM
    Properties not annotated with
    @field:Json
    actually get a value of zero and not the default value which should be time in milliseconds. I am using Moshi (retrofit2:converter-moshi). Anyone else experienced this behavior?
    Untitled
    • 1
    • 1
  • c

    Cody Engel

    12/18/2019, 9:25 PM
    For SQLDelight… Do ColumnAdapters support nullable types? I have a date,
    sentDate
    which can be null if the sending event hasn’t triggered yet. It looks like there is a closed issue so I’m assuming nullable types aren’t supported by wanted to check: https://github.com/cashapp/sqldelight/issues/145
    • 1
    • 2
  • c

    Cody Engel

    12/19/2019, 1:08 AM
    🤔 are you able to mark columns as nullable? I thought that was implied and you had to mark columns as not null if that was the case. This is what we currently have:
    CREATE TABLE campaignEntity (
        id INTEGER NOT NULL PRIMARY KEY,
        type TEXT NOT NULL,
        name TEXT NOT NULL,
        sentDate TEXT,
        amountSent INTEGER NOT NULL,
        amountToSend INTEGER NOT NULL,
        totalOpens INTEGER NOT NULL,
        uniqueOpens INTEGER NOT NULL,
        totalLinkClicks INTEGER NOT NULL,
        uniqueLinkClicks INTEGER NOT NULL,
        unsubscribes INTEGER NOT NULL,
        hardBounces INTEGER NOT NULL,
        softBounces INTEGER NOT NULL,
        totalForwards INTEGER NOT NULL,
        uniqueForwards INTEGER NOT NULL,
        totalReplies INTEGER NOT NULL,
        uniqueReplies INTEGER NOT NULL
    );
    Are you saying updating sentDate to
    DEFAULT NULL
    would make the generated column adapter to be
    String?
    instead?
    • 1
    • 1
  • m

    Maurice Jouvet

    12/30/2019, 9:27 AM
    I have a quick question with Sqldelight, I’m looking to export the database, but unable to have it, I found two instances one in the data/package/databases... and another one in Intellij Idea in src/main/sqldelight/databases/1.db (it’s the path that I used in gradle) Both db are empty (the structure is good, but no data) I know for sure that there are some records, but nothing exported, do you have an idea?
    m
    • 2
    • 5
  • v

    vinay

    01/02/2020, 7:06 AM
    Was wondering why
    workflow-ui-android
    declares minSdk 21? Is it safe to override this? I'm on minSdk 16.
    p
    t
    +2
    • 5
    • 9
  • v

    vinay

    01/06/2020, 6:34 AM
    Another question regarding
    workflow
    , how does square handle events which need to be consumed exactly once (analytics)?
    r
    z
    • 3
    • 4
  • d

    diesieben07

    01/09/2020, 11:25 PM
    Hello everyone. I am trying to test out if using Wire for gRPC is viable for me. However I already fail at the first step: Using the Gradle plugin. The documentation says I just need to add it to the
    plugins
    block (even without a version, huh?), but the plugin does not seem to be published to the Gradle plugins maven... Even adding mavenCentral to the plugins repositories does not help, even though the plugin seems to be published there.
    d
    g
    • 3
    • 7
  • d

    Dominaezzz

    01/14/2020, 4:43 PM
    How to do
    expect typealias Foo
    actual typealias Foo = SpecialNativePtr
    with Kotlin Poet?
    j
    • 2
    • 3
  • g

    Grant Park

    01/23/2020, 8:26 PM
    hmmm....so somehow a column entry was made null despite being defined NOT NULL....this couldn't have happened via INSERT
    d
    • 2
    • 2
  • m

    Maurice Jouvet

    01/31/2020, 8:00 AM
    Hi, Is there a way to have Null value with Column Adapter in SqlDelight? Thx
    c
    • 2
    • 1
  • d

    doubov

    02/05/2020, 9:33 PM
    👋 there, question about Workflow: What’s the idiomatic way of communicating between sibling Workflows?
    Parent
        Child A
        Child B
    Child A needs to send something to Child B without holding it in state inside the Parent. Is there a pattern? Right now I’ve created a Relay/Channel in the Parent, which gets passed into Child B. Child A sends an
    Output
    to Parent, which then gets routed to the Relay/Channel
    r
    z
    e
    • 4
    • 20
  • a

    Amirul Zin

    02/13/2020, 7:49 AM
    Quick question, does Dagger read any
    @Inject
    inside any generated source files? I’m trying to generate source files with unscoped
    @Inject
    constructors. Not sure if Dagger could also read all these generated sources.
    :yes: 1
    y
    • 2
    • 2
  • k

    Kris Wong

    02/14/2020, 4:34 PM
    is anyone using SQ Delight w/ robolectric? I am getting: Caused by: java.util.concurrent.ExecutionException: com.almworks.sqlite4java.SQLiteException: [14] unable to open database file
    r
    • 2
    • 10
Powered by Linen
Title
k

Kris Wong

02/14/2020, 4:34 PM
is anyone using SQ Delight w/ robolectric? I am getting: Caused by: java.util.concurrent.ExecutionException: com.almworks.sqlite4java.SQLiteException: [14] unable to open database file
r

russhwolf

02/14/2020, 4:38 PM
What driver are you using? Without Robolectric you generally want to use the jdbc driver but with Robolectric you want to use the Android driver.
k

Kris Wong

02/14/2020, 4:39 PM
Android
r

russhwolf

02/14/2020, 4:42 PM
That's the limit of my knowledge then, sorry. I have had it working though in https://github.com/russhwolf/soluna but not on the most recent versions of everything
k

Kris Wong

02/14/2020, 4:46 PM
i don't see where you're connecting your kotlin source sets to the android gradle plugin
it also looks like you may be using an in-memory DB for your tests
r

russhwolf

02/14/2020, 4:47 PM
yes I am
sqldelight stuff happens in
:soluna-mobile:shared
but yeah I see the difference now re in-memory, so this isn't a helpful example for you
k

Kris Wong

02/14/2020, 4:51 PM
I can do that as well, just prefer to be closer to production env.
turns out I was using the wrong context on
RuntimeEnvironment
View count: 13