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

adding build-scoping for builds on earlier go versions (<1.12) #1062

Merged
merged 2 commits into from
Oct 14, 2019

Conversation

marcusljx
Copy link
Contributor

Fixes #1061

This PR moves the helper function using strings.ReplaceAll to a new file which has build tags for go.1.12, limiting it to go1.12+ builds. Also added a file for go versions lesser than 1.12, using strings.Replace in place of strings.ReplaceAll.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@marcusljx
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@johanbrandhorst
Copy link
Collaborator

Hi @marcusljx, this looks great. I think you need to run the generator for the bazel files. See CONTRIBUTING.md.

@achew22
Copy link
Collaborator

achew22 commented Oct 13, 2019

Or if you want to do it manually, this file is a list of the .go files used in the build

@codecov-io
Copy link

Codecov Report

Merging #1062 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1062   +/-   ##
=======================================
  Coverage   53.84%   53.84%           
=======================================
  Files          41       42    +1     
  Lines        4147     4147           
=======================================
  Hits         2233     2233           
  Misses       1670     1670           
  Partials      244      244
Impacted Files Coverage Δ
protoc-gen-swagger/genswagger/generator.go 10.15% <ø> (+0.15%) ⬆️
protoc-gen-swagger/genswagger/helpers.go 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e652ba0...946a1df. Read the comment docs.

@marcusljx
Copy link
Contributor Author

Thanks @johanbrandhorst and @achew22! I ended up going with the manual route, as I kept getting a make:generate command not found error with the first command from the CONTRIBUTING file (docker run ....).

@achew22
Copy link
Collaborator

achew22 commented Oct 14, 2019

@marcusljx, thanks so much for fixing up the BUILD files! This looks good to me. I'm going to let @johanbrandhorst take one more look at it and merge it but looks good on my front.

@johanbrandhorst johanbrandhorst merged commit 8115cdb into grpc-ecosystem:master Oct 14, 2019
@johanbrandhorst
Copy link
Collaborator

Thanks for your contribution!

adasari pushed a commit to adasari/grpc-gateway that referenced this pull request Apr 9, 2020
* adding build-scoping for builds on earlier go versions (<1.12)

* updating `BUILD.bazel`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

protoc-gen-swagger/genswagger does not build on go1.11 and earlier versions
5 participants