You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/15 15:07:26 UTC

[GitHub] [pulsar-client-go] pgier commented on pull request #802: [oauth2] Remove oauth2 go.mod and go.sum

pgier commented on PR #802:
URL: https://github.com/apache/pulsar-client-go/pull/802#issuecomment-1215131847

   @tisonkun I tested the pulsar-ctl build, and this change has no immediate effect on it.  Go modules are tied to specific checksums, so this change would only be noticeable during the next upgrade.  The pulsar-ctl go.mod currently also has a `replace` directive which prevents upgrade.
   
   Here are the steps to upgrade, if you want to test:
   1. remove these two lines from `go.mod`
       ```
       github.com/apache/pulsar-client-go/oauth2 v0.0.0-20211108044248-fe3b7c4e445b
   
       replace github.com/apache/pulsar-client-go/oauth2 => github.com/apache/pulsar-client-go/oauth2 v0.0.0-20211006154457-742f1b107403
       ````
   2. Get the latest commit of pulsar-client-go
       ```
       go get github.com/apache/pulsar-client-go@934c867b3727fe231100715d04e363992ca5ea38
       ```
   3. Run `go mod tidy`
   4. Build as normal `make pulsar-ctl`
   
   > Although, such usage may indicate that oauth2 deserves an isolated release lifecycle. You can trade off the choices. I tend to revert this patch and keep oauth2 a separate go module. Because we accept this patch due to "there wasn't any justification given (AFAICT) for creating a separate sub-module", now we have one.
   
   I don't think this justifies the need for a sub-module.  Go is pretty efficient in terms of using only the code that it needs, so depending on the root module instead of the oauth2 module should not add any additional code/size to your binary.  The oauth2 module has never actually had an isolated release lifecycle (separate release process and version), it's always just been released along with the main project.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org