https://kotlinlang.org logo
#dokka
Title
k

Kuba Petržílka

11/19/2021, 5:04 PM
I have another issue, Dokka is removing the generics from the code blocks.. 😞
Copy code
suspend fun sampleProcessingFunction(message: AmqpMessage<String>): Outcome<AmqpConsumingError, Unit> {
becomes just:
suspend fun sampleProcessingFunction(message: AmqpMessage): Outcome {
first day I m using it and I already found 3 really bad bugs.. or am I doing something wrong?
v

Vadim Mishenev

11/21/2021, 10:41 PM
Can you share a KDoc snippet containing this code block? Do you use Html output format?
g

gildor

11/22/2021, 9:20 AM
I believe it’s better to report bugs on Dokka issue tracker
k

Kuba Petržílka

11/22/2021, 9:24 AM
@gildor usually, I like to contribute to other projects, but this time I don't have much time and reporting bugs is time consuming, I m looking for a ready to use solution, whether it will be Dokka or something else, I was hoping that there will be some reliable doc gen tool for Kotlin
@Vadim Mishenev
Copy code
3. Create instance of the connector using DSL and start publishing and/or consuming messages


       class ExampleResource {
           val connector = connector(role = PublisherAndConsumer) {
               connectionString = "<amqp://guest:guest@localhost:5672/>"
               clientName = "sample-app"
        
               consumer(::sampleProcessingFunction) {
                   workersCoroutineScope = applicationCoroutineScope
                   exchange { name = "some-ref-data" }
                   bindingKey = "refdata.*.user.#"
               }
           }
        
           val publisher = connector.publisher {
               exchange { name = "somedata-exchange" }
               routingKey = "somedata.cool.special"
           }
    
           suspend fun sampleProcessingFunction(message: AmqpMessage<String>): Outcome<AmqpConsumingError, Unit> {
               println(message.payload)
               return Success(Unit)
           }
        
           suspend fun sendSamplePublication(request: String): Outcome<AmqpPublishingError, Unit> =
               publisher(AmqpMessage(request)) 
       }


   See [connector][no.dossier.libraries.amqpconnector.dsl.connector],
   [consumer][no.dossier.libraries.amqpconnector.dsl.consumer],
   [publisher][no.dossier.libraries.amqpconnector.dsl.publisher],
   and [rpcClient][no.dossier.libraries.amqpconnector.dsl.rpcClient] 
   DSL functions for more details and examples
g

gildor

11/22/2021, 9:25 AM
It’s not really about contribution, I just mean that if you have bug, there is higher chance to get some feedback from contributors on issue tracker
k

Kuba Petržílka

11/22/2021, 9:27 AM
But I feel like since I found 4 bugs in few hours, it is probably not yet production ready, so maybe I should look for something else.. But if you say there is nothing better for Kotlin, than I don't probably have any other chance anyway
😐
@Vadim Mishenev I've realized that if I enclouse the code sample block into ``` then it somehow works and the generics are preserved, but then I cannot use correct indentation within the numbered list
Also, I would like to be able to use the same formatting for these code blocks as for those that are generated from @sample
but that is yet another thing, that @sample doesn't work in the modules / packages md files
g

gildor

11/22/2021, 9:34 AM
probably not yet production ready
well, this why it still in Alpha
k

Kuba Petržílka

11/22/2021, 10:04 AM
mhm, I see
g

gildor

11/25/2021, 4:43 AM
@Kuba Petržílka So, Dokka doesn’t have this argument anymore! https://kotlinlang.slack.com/archives/C0922A726/p1637742294216800
👍 1
4 Views