Hi Everyone!

While working on some dependency improvements to pulsar-client-go, I
noticed that the oauth2 sub-directory is defined as a go sub-module instead
of just a normal sub-directory.  This just means it has its own go.mod and
go.sum, and it's dependencies are separately managed from the main
library.  Sub-modules like this are not that common in golang projects
since they make it a bit more difficult to keep dependencies up to date.
The main use case is if the sub directory has its own release cycle
separate from the main directory [1], but that's not the case here.  In
fact, there is currently a dependency conflict in that the main module is
depending on a newer version of 'golang.org/x/oauth2' than the oauth2
sub-module, and an upgrade currently causes test failures in the oauth2
sub-module.

I didn't see any specific reason for adding the go sub-module in the
original PR [2], so I'm not sure if there is any reason to keep it.  I
created a PR to remove the sub-module [3], bring the 'golang.org/x/oauth2'
dependency in sync, and update the tests to work with the newer version.

Please discuss if you have any concerns about this change, thanks!

[1] https://stackoverflow.com/a/64667433/1637116
[2] https://github.com/apache/pulsar-client-go/pull/313
[3] https://github.com/apache/pulsar-client-go/pull/802

Reply via email to