Comments (18)
Which version of erlang are you using?
from gpb.
I'm using 19.1 and getting the following relx
error, which appears to be the same as described in erlware/relx#52
from gpb.
@orotemo, did you get the same error as @lukebakken? If so, it seems the vsn
in ebin/gpb.app
does not get correctly substituted (not at all) when created from src/gpb.app.src
. Will take a look.
from gpb.
@tomas-abrahamsson yes! Thanks.
from gpb.
Hmm.. preliminary diagnosis, it looks like (a) erlang.mk builds gpb on its own instead of using deps/gpb/Makefile or rebar, and (b) does does not support the {vsn,{cmd,Cmd}}
format that gpb uses and rebar supports (as does deps/gpb/Makefile
)
I've yet to dig into (a).
This leads to the {cmd,Cmd}
landing unmodified as vsn
value into deps/gpb/gpb.app
, which subsequently---and rightfully, I think---leads to problems when relx sees this.
Don't have any solution yet, though.. (Many Thanks for complete steps to recreate the issue!)
from gpb.
Adding NO_AUTOPATCH
will cause erlang.mk
to use the Makefile
from gpb
:
https://github.com/lukebakken/gpb_94/blob/master/Makefile#L5
However, I don't see any of the gpb
build output in _rel
.
Some info here about autopatching.
from gpb.
If I add gpb
to DEPS
in the top-level Makefile
, the _rel
dir does contain the correct output.
Output:
$ ll _rel/gpb_94_release/lib/gpb
gpb-3.26.3/ gpb_94-0.0.1/
$ ll _rel/gpb_94_release/lib/gpb-3.26.3/
total 24
drwxr-xr-x 6 lbakken lbakken 4096 Oct 20 14:38 .
drwxr-xr-x 6 lbakken lbakken 4096 Oct 20 14:38 ..
drwxr-xr-x 2 lbakken lbakken 4096 Oct 20 14:38 ebin
drwxr-xr-x 2 lbakken lbakken 4096 Oct 20 14:38 include
drwxr-xr-x 3 lbakken lbakken 4096 Oct 20 14:38 priv
drwxr-xr-x 2 lbakken lbakken 4096 Oct 20 14:38 src
from gpb.
Thanks @lukebakken for digging further!
So one need DEPS += gpb
twice, both in apps/an_app/Makefile
in the top level Makefile
, and in the top level, one also needs NO_AUTOPATCH += gpb
. Is this double need of DEPS += gpb
common procedure with relx and erlang.mk to get deps into the release or does it need to be addressed somehow? (I don't know; I haven't done this a lot)
from gpb.
I really don't know, myself. I've only used erlang.mk
for basic projects.
It appears you can remove DEPS
from apps/an_app/Makefile
and the build succeeds. I'm not sure if it would work if you have code in an_app
that depends on gpb
, however.
from gpb.
@orotemo do you think the solution by @lukebakken works well enough?
from gpb.
@tomas-abrahamsson @lukebakken: sorry for taking so long, and thank you. I managed with this solution. anyway, maybe for @essen this is just a short look to help us understand what needs to change to resolve this.
from gpb.
The vsn not being supported is a known issue. The double DEPS is more surprising and sounds like a bug in Erlang.mk.
from gpb.
How should we move forward on this?
Regarding double DEPS, should be continued as an issue on Erlang.mk?
Regarding vsn
, I suppose NO_AUTOPATCH += gpb
is ok for you, @orotemo? From a gpb point-of-view this would be preferrable, so that all of gpb builds.
from gpb.
Actually I think I see the problem. Autopatch should not run, yet it does because it sees rebar on the following line: https://github.com/tomas-abrahamsson/gpb/blob/master/Makefile#L125
But since rebar is not used, and you don't do anything special with dependencies, we have no reason to run autopatch. I have to fix Erlang.mk to ignore comments when looking for rebar usage.
from gpb.
Ok, I see. I'll be more or less offline for a few days from now, but rephrasing is quick, so should it still be needed by then, I'll do that.
from gpb.
Oddly enough Erlang doesn't care if the vsn
key is a tuple when loading the application. That's why it wasn't detected in the nightly build.
The fix is in, you can close this: ninenines/erlang.mk@a8fffe1
Thanks!
from gpb.
Excellent! Closing. @orotemo, should anything surface, just reopen or open a new.
from gpb.
I've opened ninenines/erlang.mk#633 for the double DEPS thing, FYI.
from gpb.
Related Issues (20)
- There are many deficiencies HOT 6
- Hitting `no case clause matching: :group_end` in Elixir app using Exprotobuf/gpb HOT 8
- Add preprocessor check around no_underspec? HOT 3
- Optional added back to proto3 HOT 3
- Outdated example HOT 3
- Unset `google.protobuf.StringValue` map values are decoded as empty strings instead of empty values HOT 3
- proposal for performance improvements HOT 9
- Performance improvement for encoding protos with unchanged data HOT 7
- -spec for enum generated code is incorrect HOT 3
- For gpb 5: Drop support for Erlang versions before 19
- How can i call gpb from my rebar.config? HOT 2
- [enhancement] support for gpb text format HOT 1
- I think the generated file is too big HOT 7
- -mapfields-as-maps and -json possible incompability HOT 2
- Trying to ecode a float into a uint64 field results in a badarith exception instead of gpb_type_error HOT 2
- Enums are not defined as macros HOT 7
- Fix for warning on float 0.0 HOT 5
- to_json encodes `uint64` as an integer instead of a string HOT 1
- Add a @generated tag HOT 1
- Excessive File Size in Generated Protobuf Files 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 gpb.