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

build: Fix path to openapi-gen binary #5089

Merged
merged 4 commits into from
Feb 12, 2021
Merged

build: Fix path to openapi-gen binary #5089

merged 4 commits into from
Feb 12, 2021

Conversation

terrytangyuan
Copy link
Member

Currently the openapi-gen binary is installed to $GOPATH/bin but we are calling it with other path. This will introduce errors when older versions of openapi-gen has installed (for use in other projects) and confuses the path.

unknown flag: --report-filename
Usage of openapi-gen:
      --alsologtostderr                  log to standard error as well as files
      --build-tag string                 A Go build tag to use to identify files generated by this command. Should be unique. (default "ignore_autogenerated")
  -h, --go-header-file string            File containing boilerplate header text. The string YEAR will be replaced with the current 4-digit year. (default "/Users/yuan.tang/go-workspace/src/k8s.io/code-generator/hack/boilerplate.go.txt")
  -i, --input-dirs strings               Comma-separated list of import paths to get input types from.
      --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log_dir string                   If non-empty, write log files in this directory
      --logtostderr                      log to standard error instead of files (default true)
  -o, --output-base string               Output base; defaults to $GOPATH/src/ or ./ if $GOPATH is not set. (default "/Users/yuan.tang/go-workspace/src")
  -O, --output-file-base string          Base name (without .go suffix) for output files. (default "openapi_generated")
  -p, --output-package string            Base package path.
      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
  -v, --v Level                          log level for V logs
      --verify-only                      If true, only verify existing output, do not write anything.
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging
unknown flag: --report-filename
make: *** [Makefile:505: pkg/apis/workflow/v1alpha1/openapi_generated.go] Error 2

Signed-off-by: terrytangyuan terrytangyuan@gmail.com

Checklist:

Makefile Outdated
@@ -502,7 +502,7 @@ clean:

pkg/apis/workflow/v1alpha1/openapi_generated.go: $(GOPATH)/bin/openapi-gen $(TYPES)
[ -e v3 ] || ln -s . v3
openapi-gen \
${GOPATH}/bin/openapi-gen \
Copy link
Contributor

Choose a reason for hiding this comment

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

$(GOPATH)?

Copy link
Member Author

@terrytangyuan terrytangyuan Feb 11, 2021

Choose a reason for hiding this comment

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

I used curly brances to be consistent with other similar places in Makefile, e.g. ${GOPATH}/bin/go-to-protobuf. Would you like me to change all of them to () in this PR?

Copy link
Member Author

@terrytangyuan terrytangyuan Feb 12, 2021

Choose a reason for hiding this comment

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

Just replaced all the {} by () for consistency.

Signed-off-by: terrytangyuan <terrytangyuan@gmail.com>
Signed-off-by: terrytangyuan <terrytangyuan@gmail.com>
@alexec alexec merged commit 2f7c908 into argoproj:master Feb 12, 2021
@terrytangyuan terrytangyuan deleted the fix-openapi-gen-path branch February 12, 2021 20:45
@simster7 simster7 mentioned this pull request Feb 16, 2021
33 tasks
@simster7 simster7 mentioned this pull request Feb 23, 2021
34 tasks
@simster7 simster7 mentioned this pull request Mar 8, 2021
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