You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "iMashtak (via GitHub)" <gi...@apache.org> on 2024/01/14 19:20:15 UTC

[PR] CAMEL-20333 Camel Kotlin API [camel]

iMashtak opened a new pull request, #12786:
URL: https://github.com/apache/camel/pull/12786

   Checklist:
   
   - [ ] Wrappers for EIPs (almost all for now)
   - [x] Tests (anyway i will add some more)
   - [x] Autogenerated Endpoint DSL
   - [x] Autogenerated Dataformat DSL
   - [ ] REST (started)
   - [ ] Bean registration (done, but may be better, i want it to be like in YAML DSL BeanDeserializer)
   - [ ] Documentation
   - [ ] Sourcecheck, format, etc
   
   Questions:
   
   - What do you think about this? Is it sutable with Camel development vision?
   - How to add docs for that thing? Where should i place the file?
   - I dont understand how `resumable`/`pauseable` works. In docs they always comes right after `from`, but in code they defined as member of `ProcessorDefinition` like i can use them anywhere in the route. So the question: `resumable`/`pauseable` are properties of route or processors?
   - Should i implement route templates and `kamelet` EIP in this PR? Can i delay that functionality for later time? As far as i understand, `kamelet` is purposed for calling route templates, am i right?
   - How should i resolve megre conflicts - merge or rebase?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1934795255

   and btw those are the last expected model changes. So after that we should be ready for your PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "iMashtak (via GitHub)" <gi...@apache.org>.
iMashtak commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1913110880

   Thank you for offer, i am interested. What should i do to become committer?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1934404856

   We did some changes in the model today
   
   - throttler
   - languages
   
   Can this PR be updated and generated with latest code


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "iMashtak (via GitHub)" <gi...@apache.org>.
iMashtak commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1922109872

   Support level has already been set, made regen, `variableName` added for languages where needed. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1913102235

   Yes its massive and great work to generate the DSLs and update the regular DSL to be more Kotlin like. But the users get the best experience with the standard DSLs that we have tooling and you can find the most examples and help with.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1936950847

   Thanks, can you update the PR as there was a new option so there is uncommitred code changes and the CI cannot do a full test.
   
   
   +  public fun sinkBinding(sinkBinding: String) {
   +    it.property("sinkBinding", sinkBinding)
   +  }
   +
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1936957887

   I wonder if you can make the maven plugin to only output "Generating Language DSL for simple" ... when there was some changes. Its very verbose when nothing is changed. We are doing this for the other DSLs


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1919137562

   We have updated the model DSL a little bit with more variables stuff. Not sure if this PR needs to be regenerated and updated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "iMashtak (via GitHub)" <gi...@apache.org>.
iMashtak commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1930519562

   Fixed all issues with languages
   
   I have broken time in WSL, so my commits comes from future :D 
   Found how to fix it, but too late


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #12786:
URL: https://github.com/apache/camel/pull/12786


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "iMashtak (via GitHub)" <gi...@apache.org>.
iMashtak commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1930670686

   I made Language DSL - autogen for all existing languages. Will commit tomorrow. Seems like i cant generate only model classes - EIPs and so on.
   
   As for EIPs. Feels like i need handmaided config that will describe which classes (inheritors of ProcessorDefinition) i should analyze. Maybe later i will find the way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1936958239

   Also your unit test classes should be renamed from `xxTests` to `xxTest` otherwise they do not run when doing maven test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1919138708

   Also in camel-kotlin-api/pom.xml can you set 
   
       <supportLevel>Experimental</supportLevel>
   
   If not already done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "iMashtak (via GitHub)" <gi...@apache.org>.
iMashtak commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1894450632

   I added some documentation for all of this, may be that will be helpful in undestanding whats going on in this PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1913102614

   @iMashtak are you interrested to stay active in the Camel community and keep contributing, and become a committer, and help maintain this Kotlin DSL and whatelse. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1913145904

   Sounds good. You keep contributing and doing great. The Camel PMC will then invite you in as a committer later. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1907774367

   This is a massive PR. Can you tell more what is the purpose. Can you make an example of what you can do today with camel and kotlin, and say why you need this, and what it will make better.
   
   Kotlin has java interoperability so I would assume it works fine with existing java api, endpintdsl and whatnot.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "iMashtak (via GitHub)" <gi...@apache.org>.
iMashtak commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1903978167

   As far as i can see from logs, there is a problem in `generate-all-dsl-mojo`. It needs a `camel-core-model` dependency but if i do so, there is a cyclic dependency problem. That because i generate DataFormat DSL, not write it manually, and need some reflection over `camel-core-model` classes.
   So... i will use magic of class loader as described here: [link](https://stackoverflow.com/questions/49737706/access-project-classes-from-a-maven-plugin). Will make custom class loader. It is safe approach cause `camel-kotlin-api` depends on `camel-core-model` and will be built only after it. That means that we will certainly have compiled classes of `camel-core-model` at the `camel-kotlin-api` compilation moment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "iMashtak (via GitHub)" <gi...@apache.org>.
iMashtak commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1908860360

   This is just yet another DSL for Camel, nothing more.
   
   I looked at what is done in existing Camel Kotlin DSL and found that [Kotlin type-safe builders](https://kotlinlang.org/docs/type-safe-builders.html#how-it-works) are used for defining beans and REST parts of configuration and arent used in other places. "Why?" - i had thought. And made fully Kotlin-ish thing. Massiveness comes only from huge number of components and EIPs - code is just copy-paste.
   
   There is nothing you cant do in Kotlin with Camel cause of Java interop. But this PR makes Camel more "native" for Kotlin ecosystem of tools. Also it provides an abitily to define routes using only CamelContext as input, without need in explicit RouteBuilder instantiation.
   I dont think i *need* this PR, it may be considered as an experiment.
   
   So i consider the first question of that PR: is it suitable with Camel development vision? It not, PR should be rejected as irrelevant, i think.
   I may try to generate everything including EIPs code if you consider it as blocker.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1926998010

   We have done a bit more work on the model with the languages - so this PR maybe needs to be updated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20333 Camel Kotlin API [camel]

Posted by "iMashtak (via GitHub)" <gi...@apache.org>.
iMashtak commented on PR #12786:
URL: https://github.com/apache/camel/pull/12786#issuecomment-1932590117

   Ok, language DSL is done, nothing more to commit


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org