Comments (3)
Setting GO111MODULE=off is the obvious solution, but I'd rather avoid polluting my GOPATH. I will try with a temporary GOPATH for now.
from elm-protobuf.
I appear to have successfully done this by running
go get github.com/tiziano88/[email protected]
That command added
github.com/tiziano88/elm-protobuf v0.0.5-0.20180917212848-43b6ec64321b
to the require section of my go.mod
file.
To "pin" that version (I am also vendoring) I also added a
github.com/tiziano88/elm-protobuf => github.com/tiziano88/elm-protobuf v0.0.5-0.20180917212848-43b6ec64321b
to the replace section of go.mod
. This last part is probably unnecessary but I don't want a go mod tidy
or other command to reset the version to the seemingly compatible v0.0.4
tag. Since this old tag is in the format that go modules expects, it confuses the tools.
We also have a "tools.go" file as described on the modules wiki.
// +build tools
package grpc
import (
// We are using 3.0.0 tag of this dependency, but the convention of using a
// versioned path like "github.com/tiziano88/elm-protobuf/v3" doesn't work.
// This is expected since it is not (yet?) a proper go module. This is
// exacerbated by an old "v0.0.4" tag in the repository, which the go tools
// incorrectly recognize as a pre-release module tag.
//
// Instead, there is a replace directive in the go.mod file to pin the
// correct module incompatible version.
_ "github.com/tiziano88/elm-protobuf/protoc-gen-elm"
)
I think the newer tags are in the format they are in for the sake of the elm packaging tools. Maybe dual tags are needed? But a go.mod
file would be needed as well to really make this compatible with go's packaging tools.
Isn't it funny how Elm packages are to Elm modules the same way go modules are to go packages? 😆
from elm-protobuf.
Thanks for the comments, I have not been following the latest on Go module management, if anyone wants to suggest a fix I am happy to implement it!
from elm-protobuf.
Related Issues (11)
- Support for proto2 syntax? HOT 10
- infix functions in generated decoders HOT 2
- Elm 0.19 upgrade not working HOT 2
- Update Functions HOT 4
- support gRPC services HOT 6
- Incorrect code generated with type names
- Map support HOT 7
- LIst of items not decoding HOT 1
- enum as int32 HOT 9
- name collisions HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-protobuf.