gerrit-rest-java-client icon indicating copy to clipboard operation
gerrit-rest-java-client copied to clipboard

WorkInProgressInput class is missing

Open EFregnan opened this issue 4 years ago • 7 comments

While working on the method SetWorkInProgress, I noticed that the class WorkInProgressInput is not contained in java/com/google/gerrit/extensions/api/changes.

However, my understanding is that this class is necessary for the method SetWorkInProgress to work with a message (the documentation is here).

I have already opened a discussion on the Gerrit google group about this, but I am opening a issue report here as well to keep track of this problem.

EFregnan avatar Mar 28 '21 14:03 EFregnan

It seems there was a bit of discrepancy between the name of the class reported in the documentation and the real name of the class.

The class we need is WorkInProgressOP (here). However, it is contained in the com.google.gerrit.server path, which is not included in this project.

Would it be fine to add it from the Gerrit REST API codebase?

P.s. The complete reply I received in the Google group discussion is available here.

EFregnan avatar Mar 29 '21 10:03 EFregnan

Would it be fine to add it from the Gerrit REST API codebase?

Yes, you can it.

uwolfer avatar Mar 29 '21 18:03 uwolfer

Perfect. Thank you!

EFregnan avatar Mar 29 '21 19:03 EFregnan

@uwolfer, I started to work on this but I soon realised that the amount of classes and dependencies we need to add is quite big. To complicate the situation further, there are quite a few new external dependencies that need to be imported.

Do you know if there is there an easy way to import all the dependencies from the Gerrit project or, at least, to figure out which libraries (and versions) they used?

EFregnan avatar Apr 05 '21 15:04 EFregnan

In the past, I've just copied over the whole package from Gerrit repo into this, and then wiped out some things we do not need here because they are internal or unused in another way.

But so far, we have not added any libs (except probably Guava), because Gerrit depends on it. Do you have samples of such libs?

uwolfer avatar Apr 05 '21 20:04 uwolfer

For instance, they often use classes from the AutoValue Annotations library.

I also found some uses of classes from Jgit. Some other external dependencies are used, but generally just once or twice from what I have seen.

EFregnan avatar Apr 07 '21 21:04 EFregnan

For instance, they often use classes from the AutoValue Annotations library.

So far, I think I've omitted classes using this lib (or probably I've added the code generated by this lib manually to the source, not sure anymore).

I also found some uses of classes from Jgit.

Hmm, that sounds really odd - are they using Jgit in the extensions package?

But anyway, you can probably just import classes directly related to WorkInProgressInput for now, and I can take care of doing a full sync (and also document how I do this full sync) at a later point.

uwolfer avatar Apr 08 '21 18:04 uwolfer