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
arrow-meta
  • j

    Jannis

    12/21/2019, 12:16 PM
    Random thought: With higher-kinds using arrow-meta, can we have something like
    @higherkind interface Eq<A>
    @higherkind interface Show<A> : Eq<A>
    ? With the current encoding this is not possible because we'd inherit from two Kinds
    Kind<ForEq, A>
    and
    Kind<ForShow, A>
    . This is quite useful when defining/deriving these instances (for example by using the
    Divisible
    typeclass family)
    r
    • 2
    • 14
  • s

    shikasd

    12/28/2019, 10:49 AM
    Hey, I remember you mentioning that you have set up a pipeline with to follow Kotlin snapshot releases. Does that include the all artifacts of compiler or just
    compiler-embeddable
    artifact? I just have tried to apply plugin to K/N and failing so far 😄
    r
    r
    • 3
    • 13
  • m

    mdepies

    01/05/2020, 5:48 PM
    I'm trying to resolve the type of an variable declaration where the type is implicit from the initializer
    var x = 0
    . I'm using the quote template dsl to do some manipulations with the type information. Any direction?
    r
    • 2
    • 6
  • m

    mdepies

    01/06/2020, 4:06 PM
    Is there a good [formal] way for me to compare a reference to a declaration?
    r
    • 2
    • 25
  • e

    emmanuel

    01/08/2020, 1:45 AM
    preesh the invite @amanda.hinchman-dominguez! excited to get meta 👨‍🏭🏾
    🎉 2
    a
    • 2
    • 2
  • m

    mdepies

    01/08/2020, 2:13 AM
    How can I get access to annotations defined on properties in the IrPhase? I don't have any issue finding the class annotations, but can't seem to locate where the property annotations are.
    a
    r
    • 3
    • 30
  • p

    pardom

    01/14/2020, 7:41 PM
    Is this the best place to get started making a plugin? https://github.com/arrow-kt/arrow-meta-examples
    r
    • 2
    • 9
  • m

    mdepies

    01/16/2020, 1:25 AM
    r
    r
    • 3
    • 2
  • m

    mdepies

    01/16/2020, 1:25 AM
    looks like u guys need to push the repo change to the documentation site
    r
    • 2
    • 1
  • m

    Marc Reichelt

    01/16/2020, 9:44 PM
    what do I miss?
    r
    r
    • 3
    • 9
  • j

    Joachim Ansorg

    01/17/2020, 11:04 AM
    I wanted to use my arrow-test project (https://github.com/jansorg/arrow-meta-test), but this is failing now because it can't find the gradle plugin. And the gradle plugin page is showing version
    0.0.0
    , which doesn't seem to be correct, https://plugins.gradle.org/plugin/io.arrow-kt.arrow. What's the version of the gradle plugin I have to use to make this work?
    r
    • 2
    • 12
  • c

    chrmelchior

    01/20/2020, 4:29 PM
    I’m attempting to convert the Arrow Meta hello-world example to work in a Multiplatform project, but the
    compileKotlin
    closure is not present in KMP projects. Does anyone know how to configure it? I suspect I’m missing something trivial, but cannot seem to find any documentation for compiler arguments for KMP projects.
    r
    • 2
    • 10
  • c

    chrmelchior

    01/20/2020, 10:39 PM
    I got the above working fine for JVM targets, but macOS builds are throwing:
    The provided plugin io.arrowkt.example.MetaPlugin is not compatible with this version of compiler
    and JS builds are throwing
    project ':create-plugin' is not configured for JS usage
    I disabled JS as it wasn’t something I was planing on targeting anyway, but the macOS error is a bit puzzling. Searching this Slack I can see various other reports of it, but the reasons seem a bit different. I would kinda assume that everything uses the same version of Kotlin all dependency versions are only defined in one place. Anyone got any ideas what could be causing it?
    s
    r
    n
    • 4
    • 8
  • m

    matiaslev

    01/22/2020, 7:18 PM
    Hi! I am facing this problem building arrow meta
    e: /Users/matias.lev/IdeaProjects/arrow-meta/gradle-plugin/src/main/kotlin/arrow/meta/plugin/gradle/InstallIdeaPlugin.kt: (3, 51): Symbol is declared in module 'java.xml' which does not export package '<http://com.sun.org|com.sun.org>.apache.xerces.internal.parsers'
    has Someone an insight of what could be the problem?
    r
    • 2
    • 14
  • m

    matiaslev

    01/25/2020, 7:26 PM
    Probably something local because I am on master without changes 🤔 Someones has an idea of what could be going on?
    d
    s
    r
    • 4
    • 8
  • s

    stojan

    01/29/2020, 6:10 PM
    Is this possible with the current state of arrow-meta? https://twitter.com/pacoworks/status/1222471736815386624?s=19
    r
    a
    • 3
    • 4
  • t

    tschuchort

    01/29/2020, 9:35 PM
    I'm currently looking for a topic for my bachelor thesis. Do you have any ideas for a thesis topic in the context of arrow/arrow-meta? Perhaps a first class automatic refactoring tool like Scala-Fix based on arrow-meta combined with an IDE plugin that could be used in a regex-like fashion but on AST level.
    r
    • 2
    • 4
  • s

    stojan

    02/02/2020, 3:49 PM
    trying to build a compiler plugin that targets classes annotated with
    @ValueClass
    and generates
    toString
    equals
    and
    hashCode
    (without copy) I figured out how to generate
    toString
    and
    hashCode
    (working on
    equals
    next, and probably
    componentX
    ) I figured out how to add functions to a class (Based on the Lens plugin) question: how would I add this code only to classes annotated with
    @ValueClass
    ?
    private fun isValueClass(ktClass: KtClass): Boolean =
        !ktClass.isData() &&
            ktClass.primaryConstructorParameters.isNotEmpty() &&
            ktClass.primaryConstructorParameters.all { !it.isMutable } &&
            ktClass.typeParameters.isEmpty()
    missing a check for my annotation ☝️
    r
    • 2
    • 12
  • d

    dnowak

    02/03/2020, 9:35 AM
    Hi guys, I would be helpful for any hints on how to implement retry with
    IO<Either<DomainError, Value>>
    . I would like to retry not only on
    Exception
    reported within
    IO
    context but also on logical
    DomainError
    reported within contained
    Either
    . The only thing connected to retries I found is https://github.com/luisdeltoro/arrow-effects-retry
    s
    j
    • 3
    • 25
  • j

    Joachim Ansorg

    02/08/2020, 9:43 AM
    Question on Arrow+Gradle: https://meta.arrow-kt.io/docs/apidocs/compiler-plugin/arrow.meta.plugins.hello-world/hello-world.html links to the gradle plugin page https://plugins.gradle.org/plugin/io.arrow-kt.arrow, but that's a 404. I couldn't find the current version of the arrow gradle plugin. The version I used previously doesnt't seem to be around, anymore.
    t
    r
    • 3
    • 7
  • m

    melatonina

    02/09/2020, 1:03 PM
    Hello. I'm trying to apply the "helloworld" plugin to my project. I'm getting:
    e: java.lang.NoSuchMethodError: '<http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij.openapi.extensions.impl.ExtensionPointImpl[] <http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij.openapi.extensions.impl.ExtensionsAreaImpl.getExtensionPoints()'
    . I assume the problem is in a mismatch of version of something, but I can't pinpoint what it is. Do you manage to understand it from that error message?
    i
    • 2
    • 4
  • t

    trathschlag

    02/11/2020, 12:33 PM
    Hi, I'm thinking about writing a compiler plugin to support named parameters in function types. I need it to do the following transformation:
    @NamedParameters
    typealias UpdateUserByToken = (userToken: String, update: (User) -> User) -> Unit
    to
    interface UpdateUserByToken {
        operator fun invoke(userToken: String, update: (User) -> User): Unit
    
        companion object {
            operator fun invoke(impl: (userToken: String, update: (User) -> User) -> Unit) = object: UpdateUserByToken {
                override fun invoke(userToken: String, update: (User) -> User) = impl(userToken, update)
            }
        }
    }
    So you can stuff like this:
    val updateUserByToken = UpdateUserByToken { userToken, update ->
        // implement
    }
    
    [...]
    
    updateUserByToken(userToken = "1234") {
        user.copy(email = "<mailto:foo@bar.com|foo@bar.com>")
    }
    Is this possibly with arrow-meta? How could I distribute this plugin to my colleagues? Thanks in advance!
    s
    • 2
    • 5
  • s

    shikasd

    02/14/2020, 1:25 AM
    hey, I was looking into ide plugin install and found out this task in gradle plugin: https://github.com/arrow-kt/arrow-meta/blob/b39158f3999e8963985c1bc8b5e31ccb16bdd2ef/gradle-plugin/src/main/kotlin/arrow/meta/plugin/gradle/InstallIdeaPlugin.kt I am a little bit curious, will it provide platform for other meta based plugins to be (at least partially) hot-swappable or we will have to create and install a separate ide plugin to match compiler ones?
    r
    r
    i
    • 4
    • 16
  • r

    redrield

    02/15/2020, 12:44 AM
    Can I use arrow meta to change generics on types before code analysis?
    r
    • 2
    • 16
  • r

    redrield

    02/16/2020, 7:35 PM
    https://github.com/Redrield/refinement-units proof of concept for a type-safe units of measure library that im toying with using arrow
    😱 1
    🙌 1
    r
    t
    k
    • 4
    • 4
  • r

    redrield

    02/16/2020, 8:07 PM
    Are there any example projects using arrow meta for companion IDE plugins? https://hasteb.in/nihurese.gradle this buildscript is giving me issues where i cant resolve anything (trying to auto-import IdeMetaPlugin) in intellij
    i
    r
    • 3
    • 9
  • a

    Ahmed Mourad

    03/06/2020, 8:01 PM
    Not Arrow related but can anyone help with this?
    r
    i
    • 3
    • 18
  • i

    Ivann Ruiz

    03/08/2020, 4:33 PM
    Has anybody tried using Arrow-meta in a kotlin multiplatform project? I'm thinking of using the Type Union feature to replace the Either monad for UseCases in CLEAN Architecture, but I think the compiler additions might not play very well with Kotlin Native... Thoughts?
    r
    a
    • 3
    • 8
  • e

    Eugeniu Olog

    03/18/2020, 10:51 AM
    Hi guys, I'm trying to create a compiler plugin for an Android project, but I have some issues. I took a look at examples, but it is using
    shadowJar
    and I can't make it work with Android. Do you have any suggestion or example? Thank you
    ❤️ 3
    r
    r
    • 3
    • 10
  • s

    spierce7

    03/25/2020, 4:15 AM
    My goal is to create a library where I find classes that have a certain annotation. Then I want to identify the public API for that class, and generate another class that wraps that class. Will I need to create an IDE plugin to allow the new generated class to be resolved? Can anyone point me in the right direction to how I can learn to do this? The docs aren’t super helpful, and I’ve only been able to find one sample.
    r
    t
    • 3
    • 7
Powered by Linen
Title
s

spierce7

03/25/2020, 4:15 AM
My goal is to create a library where I find classes that have a certain annotation. Then I want to identify the public API for that class, and generate another class that wraps that class. Will I need to create an IDE plugin to allow the new generated class to be resolved? Can anyone point me in the right direction to how I can learn to do this? The docs aren’t super helpful, and I’ve only been able to find one sample.
r

raulraja

03/25/2020, 8:56 AM
Hi Scott, You need an IDE plugin when you perform transformations in place in the same file for example with Transform.replace
But if you use Transform.newSources it generates new code in new files and in that case they don’t need to change the synth descriptors of the original files
s

spierce7

03/25/2020, 1:35 PM
@raulraja Thanks for responding! So how would I find classes that have certain annotations? After I do that, I should be able to use
Transform.replace
, generate a new class, and generate new files, and not require an IDE plugin? Some other questions: 1. All jvm platforms support IR in 1.4 right, so by using arrow, I can make a plugin that impacts all platforms in 1.4? 2. How does incremental compilation work? I wouldn’t want to generate a new file and have that new file compile for every compilation.
t

tschuchort

03/25/2020, 7:37 PM
Try github.com/foso/MpApt
s

spierce7

03/26/2020, 5:04 PM
@raulraja If I add a class to a file so that class can access a private class in the same file, is an IDE plugin required?
r

raulraja

03/26/2020, 5:06 PM
Anything that mutates the tree in place as a user is typing in IDEA and adds new members to the document the user is typing on at the moment requires an IDEA plugin that provides the synth descriptors.
s

spierce7

03/26/2020, 5:13 PM
ok - IC
View count: 3