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
  • a

    amanda.hinchman-dominguez

    11/01/2019, 9:23 PM
    Are we able to use
    @extensions
    on independent functions now in Arrow?
    r
    r
    • 3
    • 3
  • r

    Ryan Benasutti

    11/02/2019, 12:20 AM
    I'm looking into #56, can someone explain what
    LineMarkerDescription.slowLM
    is?
    LineMarkerDescription.lineMarker
    seems fairly intuitive, but
    slowLM
    seems to only ever be empty.
    i
    • 2
    • 2
  • r

    raulraja

    11/03/2019, 11:33 PM
    https://github.com/arrow-kt/arrow-meta/pull/64
    :arrow: 7
    t
    • 2
    • 8
  • a

    amanda.hinchman-dominguez

    11/04/2019, 5:30 PM
    After more general studies about compilers for statically-typed languages, I'd say that arrow-meta largely resides hooking into the front/middle end of the compiler. I hope I can share an infographic on how I mean in a bit
    t
    r
    • 3
    • 4
  • a

    amanda.hinchman-dominguez

    11/04/2019, 6:14 PM
    Arrow-meta has the ability to hook into the front-end and the intermediate code-optimizer
    👍 1
    r
    • 2
    • 33
  • a

    amanda.hinchman-dominguez

    11/04/2019, 8:12 PM
    @raulraja we can keep tweaking this over time, I know this isn't quite right. I didn't put in FIR because it's not complete
    r
    • 2
    • 1
  • t

    tschuchort

    11/04/2019, 8:39 PM
    Really this stuff should be part of the Kotlin docs. Swift has so much better documentation on the compiler
    ➕ 2
    :kotlin: 1
    a
    r
    j
    • 4
    • 30
  • a

    amanda.hinchman-dominguez

    11/04/2019, 8:58 PM
    I'm itching to try out what you put in for testing cleanup for your Union work @raulraja - although when I was looking at the code this morning, I saw that you are still including the
    annotations
    dependency in your testing when I didn't see any annotations being marked in the source code. Perhaps I'm not understanding how this should work?
    r
    • 2
    • 9
  • s

    shikasd

    11/05/2019, 1:04 AM
    Hey, as I know arrow-meta have quasi quotes dsl, but it requires user to be in the compiler context already. I was thinking that it is possible to add user created macros to the language similar to how scala or rust do it, without going through troubles of gradle/compiler plugins. I experimented with applying those in a similar way to quasi quotes implementation: client code: https://github.com/ShikaSD/kotlin-compiler-di/blob/macro-experiment/src/main/kotlin/AnotherThing.kt compiler code: https://github.com/ShikaSD/kotlin-compiler-di/blob/macro-experiment/buildSrc/compiler-plugin/kotlin-plugin/src/main/java/me/shika/di/TestMacroAnalysisExtension.kt Of course, I used regex for poc (:D), but it can be defined with proper grammar, which is parsed in the compiler plugin (for example using antlr or similar parsers).
    d
    r
    • 3
    • 8
  • a

    amanda.hinchman-dominguez

    11/05/2019, 5:10 PM
    afaik it's a "soft no" but there are ways to do it with messing Kotlin compiler, at least. What are you trying to do with IntelliJ? Are you writing an idea plugin at the moment?
    j
    • 2
    • 1
  • j

    jossiwolf

    11/05/2019, 5:11 PM
    When you import the Kotlin project into IntelliJ, there's a run configuration for launching an IntelliJ instance with the modified Kotlin Plugin/Compiler Re-running that every time seems just like there should be a better solution that allows me to just recompile my changes in the Compiler and "inject" them into the running IntelliJ instance
    👍 1
    a
    • 2
    • 6
  • a

    amanda.hinchman-dominguez

    11/05/2019, 5:22 PM
    we run some tests on it so we can do debugging and also test aspects of our compiler plugins
    • 1
    • 5
  • a

    amanda.hinchman-dominguez

    11/05/2019, 5:29 PM
    @jossiwolf If you wish to run it from the IDE, another idea could be to simply run a CLI version and execute the the Kotlin script and render the result of that?
    j
    • 2
    • 2
  • r

    raulraja

    11/05/2019, 5:44 PM
    @jossiwolf There is no chance AFAIK since that is based on the plugin layout but I heard IDEA now works with hots reloading for plugin when they get updates in some cases
    f
    • 2
    • 1
  • b

    bloder

    11/07/2019, 3:37 AM
    Hi guys, one question, the typeclass compiler plugin extension in arrow meta allows me to implement typeclasses like Keep 87 proposes?
    s
    r
    +2
    • 5
    • 9
  • a

    amanda.hinchman-dominguez

    11/07/2019, 8:41 PM
    what's happening with the
    quoteOutputMatches
    ? Why are there repetitive code in the source strings between both the code snippet and whatever is in
    quoteOutputMatches(...)
    ? i.e. HigherTestPlugins.kt
    i
    r
    • 3
    • 20
  • s

    shikasd

    11/08/2019, 2:53 AM
    Hi, regarding arrow-meta as a "sdk" for building other compiler plugins, do you have any plans to publish it separately? As I can see right now, DSL and plugins themselves are in a single module, so that's why I am asking 🙂 Also it is one of those "when" questions, as I would love to stop setting up those things myself.
    r
    • 2
    • 2
  • b

    bloder

    11/08/2019, 4:44 AM
    Hi all, it's an arrow setup and probably a newbie question (sorry about that, starting now with arrow 😅), I'm trying to use arrow
    0.10.3-SNAPSHOT
    features ( more specific typeclass
    given
    meta feature ), but I'm aways getting:
    error: @instance is only allowed on `interface` extending another interface of at least one type argument (type class) as first declaration in the instance list
    and if I change that to an interface I cannot find the reference of the extension function I believe that is expected in a context that there's no compiler plugin working on that, then probably I'm missing something in arrow dependencies import I've setup my project like this:
    apply plugin: 'kotlin-kapt'
    
    def arrow_version = "0.10.3-SNAPSHOT"
    dependencies {
        implementation "io.arrow-kt:arrow-fx:$arrow_version"
        implementation "io.arrow-kt:arrow-optics:$arrow_version"
        implementation "io.arrow-kt:arrow-syntax:$arrow_version"
        kapt    "io.arrow-kt:arrow-meta:$arrow_version"
    }
    What am I missing?
    r
    a
    • 3
    • 12
  • r

    raulraja

    11/09/2019, 6:32 PM
    We have to unshadow it on the way back for the idea plugin to be able to reuse code on the idea plugin from the compiler plugin
    💯 1
    a
    • 2
    • 21
  • i

    Imran/Malic

    11/09/2019, 9:21 PM
    https://github.com/arrow-kt/arrow-meta/pull/99
    👍 1
    k
    r
    • 3
    • 8
  • j

    jereksel

    11/10/2019, 7:47 PM
    I was working on compiler plugin for optics
    simplescreenrecorder123.mp4
    🔝 1
    🎉 3
    s
    • 2
    • 3
  • r

    raulraja

    11/11/2019, 1:54 PM
    Today at 7pm (GMT+1) I’ll be showing @bloder and others the internals of Arrow Meta looking at the code. Anyone interested is welcome to join for an internals walkthrough. This is meant to be for people that want to understand the inner parts of meta for other contributions they are working on. ZOOM : https://zoom.us/j/878707806 GCal : https://calendar.google.com/event?action=TEMPLATE&tmeid=MWZqZ2FkaXFnc2loZHZtazQ1aDhnc2swb3QgcmF1bEA0N2RlZy5jb20&tmsrc=raul%4047deg.com
    👍 6
    💯 5
    a
    r
    +3
    • 6
    • 12
  • a

    amanda.hinchman-dominguez

    11/11/2019, 2:48 PM
    What if we did something like this:
    val getValOrVarKeyword: Scoped<PsiElement> = Scoped(value.getValOrVarKeyword)
    r
    b
    • 3
    • 47
  • r

    raulraja

    11/11/2019, 3:46 PM
    A good first issue https://github.com/arrow-kt/arrow-meta/issues/107
    🙌 1
    🎉 1
    a
    • 2
    • 1
  • j

    Jannis

    11/11/2019, 6:14 PM
    yay, zoom is not receiving any audio packets for me... video works fine, audio in general works, but no received data for audio in the statistics 😕 Is joining and rejoining a problem or does it trigger sounds etc? If so I'll just leave it and try fix it later...
    • 1
    • 1
  • j

    jereksel

    11/12/2019, 11:10 PM
    So I was wondering if you can generate Lenses for external classes
    optics_compiler_plugin_external_poc-(2).mp4
    🚀 2
    r
    • 2
    • 5
  • a

    amanda.hinchman-dominguez

    11/13/2019, 5:50 PM
    @raulraja @bloder I ran into some weirdness attempting to create a default element scope for
    KtNullableType
    and thought it would be good to also bring it here: https://github.com/arrow-kt/arrow-meta/pull/108#discussion_r345906518
    r
    t
    • 3
    • 13
  • j

    Joachim Ansorg

    11/13/2019, 6:34 PM
    which repository provides
    io.arrow-kt:arrow-meta-compiler-plugin:1.3.70-SNAPSHOT
    ? I'm trying to setup a simple project using arrow-meta by using https://plugins.gradle.org/plugin/io.arrow-kt.arrow, the gradle plugin requires the dependency above
    r
    s
    +2
    • 5
    • 24
  • a

    amanda.hinchman-dominguez

    11/13/2019, 7:17 PM
    Hey folks - @bloder and myself will be having a hangout session to talk about the AST scope and quote system and to also share some knowledge about AST in relation to the compiler in 40 minutes (2PM CDT) https://meet.google.com/zsq-umfa-dpv
    d
    • 2
    • 2
  • j

    Joachim Ansorg

    11/14/2019, 9:17 AM
    I have created a small test repository to be able to work on arrow-meta. But I can't solve a few build issues. The repo is at https://github.com/jansorg/arrow-meta-test. I assume that it's missing arrow-annotations and added the dependency I could find. But it's not yet working properly. Does anyone know a solution to this? (cc @Rachel) Errors:
    > Task :compileKotlin FAILED
    e: /IslandWork/source/arrow-test/src/main/kotlin/arrow/Person.kt: (6, 12): Unresolved reference: synthetic
    e: /IslandWork/source/arrow-test/src/main/kotlin/arrow/Person.kt: (10, 8): Unresolved reference: synthetic
    e: /IslandWork/source/arrow-test/src/main/kotlin/arrow/Person.kt: (14, 12): Unresolved reference: synthetic
    r
    i
    • 3
    • 13
Powered by Linen
Title
j

Joachim Ansorg

11/14/2019, 9:17 AM
I have created a small test repository to be able to work on arrow-meta. But I can't solve a few build issues. The repo is at https://github.com/jansorg/arrow-meta-test. I assume that it's missing arrow-annotations and added the dependency I could find. But it's not yet working properly. Does anyone know a solution to this? (cc @Rachel) Errors:
> Task :compileKotlin FAILED
e: /IslandWork/source/arrow-test/src/main/kotlin/arrow/Person.kt: (6, 12): Unresolved reference: synthetic
e: /IslandWork/source/arrow-test/src/main/kotlin/arrow/Person.kt: (10, 8): Unresolved reference: synthetic
e: /IslandWork/source/arrow-test/src/main/kotlin/arrow/Person.kt: (14, 12): Unresolved reference: synthetic
r

Rachel

11/14/2019, 9:45 AM
Right @Joachim Ansorg, that errors come from a missing arrow-annotations:
compileOnly "io.arrow-kt:arrow-annotations:0.10.3"
I'm going to check out your repository in case I can help you with other issues
j

Joachim Ansorg

11/14/2019, 9:50 AM
thanks, I had
0.10.0-SNAPSHOT
, which was apparently missing
synthetic
. I pushed the change to my repo
👍 1
i

Imran/Malic

11/14/2019, 9:57 AM
Yes the arrow-synthetic annotation is missing there is an PR for that https://github.com/arrow-kt/arrow-meta/pull/115
r

Rachel

11/14/2019, 10:01 AM
@Imran/Malic, I think it's already in arrow-annotations
i

Imran/Malic

11/14/2019, 10:08 AM
Oh, but then we need to change it to
AnnotationRetention.SOURCE
and not
AnnotationRetention.RUNTIME
. If you want I can create the PR and you’ll review it, no.
I cant say confidently why
RUNTIME
works in the TestEnvironment, but I had similar issues running the compiler when I tried integrating it to
arrow
turning the AnnotationRetention to
SOURCE
solved that issue.
But their might be also another solution for this if we want
arrow.synthetic
to stay a RUNTIME annotation.
@Joachim Ansorg did it work when you added
AnnotationRetention.SOURCE
?
j

Joachim Ansorg

11/14/2019, 1:54 PM
I was using this in a module outside of arrow-meta. I switched to the dependency posted by Rachel and that worked. As far as I can tell the current IDE implementation needs the annotation at runtime,
SOURCE
wouldn't be enough
This may change when I have some results for my current task, but it's too early to tell
i

Imran/Malic

11/14/2019, 2:25 PM
Perfect, 🙂 thanks @Rachel
View count: 2