Skip to content

Expose the full protoc CLI#54

Open
andreaTP wants to merge 3 commits intoroastedroot:mainfrom
andreaTP:issue-30
Open

Expose the full protoc CLI#54
andreaTP wants to merge 3 commits intoroastedroot:mainfrom
andreaTP:issue-30

Conversation

@andreaTP
Copy link
Contributor

This is a step forward to, eventually, enable #30 , I finally took the time to look into it.

I know this is not "exactly" in the direction you envision @ascopes , still it should enable the use case.
Please, @ascopes , verify those changes, and we can move from there.

protected abstract ProtobufTestAdapter createAdapter(Path workdir);

@Test
public void shouldInvokeMockSubprocessForExternalPlugin() throws Exception {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For reviewers, this test shows the exposed "enabling" functionality

@ascopes
Copy link
Collaborator

ascopes commented Feb 17, 2026

Think this is a great start! When I have some time again I'll see if I can hook it into the tooling on my side and see how that goes!

Thanks for putting the time into getting this working.

@andreaTP
Copy link
Contributor Author

andreaTP commented Mar 5, 2026

@ascopes have you had the chance to try to integrate those changes into your pipeline, does it helps?

@ascopes
Copy link
Collaborator

ascopes commented Mar 5, 2026

@andreaTP I haven't just yet unfortunately, things have been pretty manic recently. Need to spend some time trying to work out the best way of exposing this such that it still remains totally agnostic.

Apologies for the delay. It is still on my radar 🙂

@andreaTP
Copy link
Contributor Author

andreaTP commented Mar 5, 2026

Thanks for getting back, that's fine, it's enough to hear is on your radar, take your time!

@ascopes
Copy link
Collaborator

ascopes commented Mar 8, 2026

@andreaTP regarding getting a build to try this on, am I able to just fudge the WASM binaries in from this branch into my local Maven repository, or does it require a build from scratch to work?

I might have a little time today to fiddle around with some stuff.

@andreaTP
Copy link
Contributor Author

andreaTP commented Mar 8, 2026

You can use the binaries committed on this branch 👍

@ascopes
Copy link
Collaborator

ascopes commented Mar 15, 2026

Just having a look at this, are we setting the Main-Class Manifest attribute anywhere for the core-v4 package?

➜  protobuf4j git:(issue-30) java -jar ~/.m2/repository/io/roastedroot/protobuf4j-v4/999-SNAPSHOT/protobuf4j-v4-999-SNAPSHOT.jar
no main manifest attribute, in /data/data/com.termux/files/home/.m2/repository/io/roastedroot/protobuf4j-v4/999-SNAPSHOT/protobuf4j-v4-999-SNAPSHOT.jar

Thinking we need to override the Maven JAR Plugin in the core-v3 and core-v4 projects to inject the Main-Class attribute into the manifest so the JAR can be executable without users needing to explicitly find out and specify the main class FQDN.

(Aware the classpath of the dependency tree is also missing from above but I have logic already in place to be able to compute the appropriate values for this already so that side of this should be fine).

@andreaTP
Copy link
Contributor Author

are we setting the Main-Class Manifest attribute anywhere for the core-v4 package?

not yet, it should be easy to do so though, either in the core package or in a dependent "CLI" module.
Are you blocked on this detail?

@ascopes
Copy link
Collaborator

ascopes commented Mar 16, 2026

@andreaTP not blocked per sé as luckily on my side I've already got the ability to inject the entrypoint. Was mostly mentioning in case you wanted to include it on this PR

@andreaTP
Copy link
Contributor Author

Good to hear!
This week I'm surely swamped, but, if you can confirm that this development makes it viable to use protobuf4j in the Maven plugin I'll go ahead on this effort 🙂

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