jbang icon indicating copy to clipboard operation
jbang copied to clipboard

option for turning on/off integrations

Open maxandersen opened this issue 1 year ago • 7 comments
trafficstars

as discussed in #1774 there can be situatons where the classpath contains integrations you dont want to run.

we should at a minimum have a global off switch, maybe --no-integrations where --integrations are default ?

possibly consider --integrations=none and --integrations=all is default and open up for allowing list of '.' names to turn on/off specific integrations?

maxandersen avatar Mar 22 '24 07:03 maxandersen

Couldn't it be something that is controlled in the comments of the file itself? Similar to other keywords like: //DEPS, //REPOS, //JAVA.

I would prefer having it in the source than having to type it on the command line every time I execute the script.

jmini avatar Mar 22 '24 08:03 jmini

@maxandersen perhaps this should be part of the build steps feature I had been working on some time ago? There were several ways to select which steps to run, including from the sleeve file. We could then great the quarkus integration as a kind of legacy build step.

quintesse avatar Mar 22 '24 20:03 quintesse

How would that look?

maxandersen avatar Mar 23 '24 11:03 maxandersen

@maxandersen @quintesse we would be very interested by this feature, since we currently can't execute a client library that is built with quarkus but that has no dependency on quarkus. What can we do to push this forward?

jmini avatar Nov 25 '24 14:11 jmini

submit a PR with a flag, maybe --integrations that take an optional list of names that will match on substring. Allowing you to do:

--no-integrations that runs nothing. --integrations that runs as is today --integrations=quarkus only run things matching 'quarkus' --no-integrations=quarkus run everything but things matching quarkus

....if wanna keep it simple then just start with --integrations/--no-integrations (negatable=true in picocli)

maxandersen avatar Dec 02 '24 07:12 maxandersen

realized its pretty easy to do. draft at #1875 to try.

maxandersen avatar Dec 02 '24 07:12 maxandersen

This works perfectly. See: https://github.com/orgs/jbangdev/discussions/1774#discussioncomment-11761212

Thank you very much.

jmini avatar Jan 07 '25 13:01 jmini