Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --no-integrations option #1875

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

maxandersen
Copy link
Collaborator

realized #1776 didn't require much for the first MVP.

adds a --no-integrations option to disable execution of integrations.

@maxandersen
Copy link
Collaborator Author

opening as draft as not sure this is how it should look.

@jmini give it a try for your executable and tell me if works for you or things missing.

@@ -77,7 +77,7 @@ public class Util {
Pattern.MULTILINE);

public static final Pattern mainClassMethod = Pattern.compile(
"(?<=\\n|\\A)(?:public\\s)\\s*(class)\\s*([^\\n\\s]*)");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated change, isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact the IT tests now fail with the following error, could that be because of this?

Error:  [3:134] [ERROR] no main class deduced, specified nor found in a manifest
dev.jbang.cli.ExitException: no main class deduced, specified nor found in a manifest
	at dev.jbang.source.generators.JarCmdGenerator.generateCommandLineList(JarCmdGenerator.java:177)
	at dev.jbang.source.generators.BaseCmdGenerator.generate(BaseCmdGenerator.java:51)
	at dev.jbang.cli.Run.doCall(Run.java:93)
	at dev.jbang.cli.BaseCommand.call(BaseCommand.java:145)
	at dev.jbang.cli.BaseCommand.call(BaseCommand.java:21)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at dev.jbang.cli.JBang$3.handle(JBang.java:150)
	at dev.jbang.cli.JBang$3.handle(JBang.java:145)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at dev.jbang.Main.main(Main.java:14)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah thatwas definitely not intended.

@quintesse quintesse force-pushed the nointegrations branch 2 times, most recently from b3abe6e to a1c48c3 Compare December 2, 2024 12:06
@quintesse
Copy link
Contributor

quintesse commented Dec 2, 2024

@maxandersen I updated the PR with the "actual" code. (The --(no-)integrations option changes compile output, like for example --native, and should therefore be part of the Project options. I changed the PR to reflect that.)

(I am starting to dislike having to copy all options to the Alias class though)

@quintesse
Copy link
Contributor

quintesse commented Dec 3, 2024

Hmmm weird, the error is still there...

Edit: then the problem is most likely in my changes given the fact the error occurs in a Quarkus-related test. I'll look into it tomorrow (= later today).

@quintesse
Copy link
Contributor

Ok, problem fixed and I added support for a //NOINTEGRATIONS tag as well.

@maxandersen maxandersen marked this pull request as ready for review December 5, 2024 14:09
@maxandersen maxandersen merged commit 1b2b928 into jbangdev:main Dec 10, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants