-
Notifications
You must be signed in to change notification settings - Fork 594
ci-tools: versions of golang #547
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
Conversation
With dash 0.5.7: # make docs /bin/sh: 1: test: 1.3.3: unexpected operator /bin/sh: 1: test: 1.3.3: unexpected operator /bin/sh: 1: test: 1.3.3: unexpected operator Makefile:47: *** cannot build output//oci-runtime-spec.pdf without either pandoc or docker. Stop. # command -V test test is a shell builtin POSIX defines '=' for string comparison [1]; the '==' form is a Bashism. SHELL was added in f3fdf03 (Makefile: prefer bash, 2016-05-25, opencontainers#455) to avoid these "unexpected operator" errors, but there's no reason to require Bash when we can make the comparison's POSIX compliant. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html Signed-off-by: W. Trevor King <[email protected]>
b574036 to
300eb00
Compare
Makefile
Outdated
| OUTPUT_DIRNAME ?= output/ | ||
| DOC_FILENAME ?= oci-runtime-spec | ||
| SHELL ?= $(shell command -v bash 2>/dev/null) | ||
| SHELL ?= $(shell command -v sh 2>/dev/null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this. From the GNU Make docs:
The program used as the shell is taken from the variable
SHELL. If this variable is not set in your makefile, the program/bin/shis used as the shell.
Although GNU Make does some dancing for DOS/Windows. Are you including this line to skip that dance? If so, why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed it
On Mon, Aug 29, 2016 at 2:06 PM W. Trevor King [email protected]
wrote:
In Makefile
#547 (comment)
:@@ -2,7 +2,7 @@
EPOCH_TEST_COMMIT := 78e6667
OUTPUT_DIRNAME ?= output/
DOC_FILENAME ?= oci-runtime-spec
-SHELL ?= $(shell command -v bash 2>/dev/null)
+SHELL ?= $(shell command -v sh 2>/dev/null)I don't think we need this. From the GNU Make docs
https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html
:The program used as the shell is taken from the variable SHELL. If this
variable is not set in your makefile, the program /bin/sh is used as the
shell.Although GNU Make does some dancing for DOS/Windows. Are you including
this line to skip that dance? If so, why?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/opencontainers/runtime-spec/pull/547/files/300eb002e587ff9851578f9147b438cc53c9b5d0#r76655651,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEF6Wsldb7cZg5PLBbm9ycIlQ_OtVrrks5qkx-SgaJpZM4JvfF1
.
Makefile
Outdated
| .install.govet: | ||
| ifeq ($(call ALLOWED_GO_VERSION,1.5,$(HOST_GOLANG_VERSION)),true) | ||
| go get golang.org/x/tools/cmd/vet | ||
| ifneq ($(call ALLOWED_GO_VERSION,1.5,$(HOST_GOLANG_VERSION)),true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it's allowing 1.4 again. I think we want to check if the Go version is in a whitelisted set, or not in a blacklisted set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we're not testing against 1.4 in Travis.
On Mon, Aug 29, 2016, 15:59 W. Trevor King [email protected] wrote:
In Makefile
#547 (comment)
:endif
go vet is now included in >=go1.5, so no need to get it.
.install.govet:
-ifeq ($(call ALLOWED_GO_VERSION,1.5,$ (HOST_GOLANG_VERSION)),true)
- go get golang.org/x/tools/cmd/vet
+ifneq ($(call ALLOWED_GO_VERSION,1.5,$ (HOST_GOLANG_VERSION)),true)This looks like it's allowing 1.4 again. I think we want to check if the
Go version is in a whitelisted set, or not in a blacklisted set.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/opencontainers/runtime-spec/pull/547/files/a24d96131cdcc41bff4cd64cae01dfe719a79000#r76675840,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEF6XSyNiLO20rjNI6gDypnullgTJ6Rks5qkzoTgaJpZM4JvfF1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Mon, Aug 29, 2016 at 04:03:25PM -0700, Vincent Batts wrote:
endif
go vet is now included in >=go1.5, so no need to get it.
.install.govet:
-ifeq ($(call ALLOWED_GO_VERSION,1.5,$ (HOST_GOLANG_VERSION)),true)
- go get golang.org/x/tools/cmd/vet
+ifneq ($(call ALLOWED_GO_VERSION,1.5,$ (HOST_GOLANG_VERSION)),true)But we're not testing against 1.4 in Travis.
Travis is not the only Makefile consumer. If it was, you wouldn't
need this check at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing where go1.4 is supported. What are you saying? that go1.4 ought to be allowed, but isn't? or that govet now support go1.4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Tue, Aug 30, 2016 at 10:08:31AM -0700, Vincent Batts wrote:
endif
go vet is now included in >=go1.5, so no need to get it.
.install.govet:
-ifeq ($(call ALLOWED_GO_VERSION,1.5,$ (HOST_GOLANG_VERSION)),true)
- go get golang.org/x/tools/cmd/vet
+ifneq ($(call ALLOWED_GO_VERSION,1.5,$ (HOST_GOLANG_VERSION)),true)I'm not seeing where go1.4 is supported. What are you saying? that
go1.4 ought to be allowed, but isn't? or that govet now support
go1.4?
With your change, the Makefile will no longer error out when the host
Go version is 1.4. But govet does not support Go 1.4, so we still
want to error out in that situation. Travis will not invoke the
Makefile with a host Go 1.4, but a non-Travis user/developer might, so
we still want to cover the Go 1.4 situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turns out that it's not needed. govet is not installable even with go1.4. I've removed the install line entirely
|
PTAL |
| # go vet is now included in >=go1.5, so no need to get it. | ||
| .install.govet: | ||
| ifeq ($(call ALLOWED_GO_VERSION,1.5,$(HOST_GOLANG_VERSION)),true) | ||
| go get golang.org/x/tools/cmd/vet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you drop this, you'll also want to rewrite/remove the line in the .govet recipe with the:
ERROR: 'go vet' not found. Consider 'make install.tools' target
message.
Add and update golang versions. Also fix install.tools target for installing govet Signed-off-by: Vincent Batts <[email protected]>
|
PTAL |
|
d4ede0d looks good to me.
|
Add and update golang versions. Also fix install.tools target for
installing govet
Signed-off-by: Vincent Batts [email protected]