Skip to content

Conversation

jhump
Copy link
Contributor

@jhump jhump commented Apr 17, 2023

I was curious about the previously merged PR (#238), noticing that it only updated the JS code and not any Go code where the webform was embedded.

I now see that go:embed is used, which is why no explicit Go code had to be changed. Nice!

But while playing with it, I realized that make generate wasn't being checked in CI, to make sure that all code was up to date from code generators. So this adds such a check to CI.

@go install google.golang.org/protobuf/cmd/protoc-gen-go@a709e31e5d12
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1.0
@go install github.com/jhump/protoreflect/desc/sourceinfo/cmd/protoc-gen-gosrcinfo
@go install github.com/jhump/protoreflect/desc/sourceinfo/cmd/protoc-gen-gosrcinfo@v1.14.1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line wouldn't run without this explicit version. The v1.14.1 tag for this repo is already in go.mod, however there are some transitive deps of this package that are not otherwise used by this repo, so they had no entries in go.sum. This gets it working again.

Copy link
Member

Choose a reason for hiding this comment

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

Explicit deps FTW

rm -rf ./.tmp/protoc
mkdir -p .tmp/protoc
curl -L "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-${PROTOC_OS}-${PROTOC_ARCH}.zip" > .tmp/protoc/protoc.zip
cd ./.tmp/protoc && unzip protoc.zip && cd ..
Copy link
Member

@dragonsinth dragonsinth Apr 18, 2023

Choose a reason for hiding this comment

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

Suggested change
cd ./.tmp/protoc && unzip protoc.zip && cd ..
cd ./.tmp/protoc && unzip protoc.zip && cd ../..

pushd/popd not generally available? just curious

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


cd $(dirname $0)

PROTOC_VERSION="22.0"
Copy link
Member

Choose a reason for hiding this comment

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

Could we pass this value in from the Makefile for clarity?

What version were we using before? I noticed the outputs are changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@dragonsinth dragonsinth left a comment

Choose a reason for hiding this comment

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

LGTM with a couple nits

@@ -89,7 +90,6 @@ errcheck:
test:
go test -race ./...

.tmp/protoc/bin/protoc:
.tmp/protoc/bin/protoc: ./Makefile ./download_protoc.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the deps here, so that the compiler is auto-redownloaded if we change the version (which is in the Makefile) or the download script.

Copy link
Member

Choose a reason for hiding this comment

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

👍 nice

@dragonsinth dragonsinth merged commit b8c1e1f into fullstorydev:master Apr 18, 2023
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