camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

re-evaluate language parsing

Open lburgazzoli opened this issue 5 years ago • 5 comments

Integration sources introspection is done using a mix of technique:

  1. inspecting nodes for mark-up languages
  2. regexp for everything else

While 1. may be good enough, that is not certainly the case for 2. as we have a number of complains such as the fact that the parser does not properly handle commented out code. Using regexp make it also quite complex to keep-up with the evolution of Camel's DSL as example, we can't understand the new endpoint DSL.

Because of the limitation of the current approach we should re-evaluate it and switch to something like ANTLR4 to generate a proper model definition.

As side note I wonder if we should keep the result of this introspection as side resource of Integration for troubleshooting.

lburgazzoli avatar Feb 11 '20 16:02 lburgazzoli

This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!

github-actions[bot] avatar Dec 17 '21 00:12 github-actions[bot]

@lburgazzoli should we leverage the capabilities offered by Camel JBang?

squakez avatar Feb 02 '23 12:02 squakez

maybe not exactly camel-jbang per se but something that is used behind the scenes by camel-jbang to inspect routes.

lburgazzoli avatar Feb 02 '23 12:02 lburgazzoli

maybe not exactly camel-jbang per se but something that is used behind the scenes by camel-jbang to inspect routes.

Thanks, but how would you see this in relation to #4024? I mean, if we manage to leverage the project generated by Camel JBang, shouldn't we be fine? or is there anything else we still need to parse by any chance? I may miss this last point.

squakez avatar Feb 02 '23 12:02 squakez

The project generator is one side but we also need to inspect the routes for auto discovery of features and to find out suitable kit. So we would need a tool that generate a sort of model the camel-k operator can leverage before triggering a build.

lburgazzoli avatar Feb 02 '23 13:02 lburgazzoli