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

Problem with Hex package causing endless rebuilds due to wrong app version settings #382

Open
nickelization opened this issue Jun 10, 2019 · 1 comment

Comments

@nickelization
Copy link
Contributor

nickelization commented Jun 10, 2019

The develop branch has the vsn setting in riakc.app.src set to git, and so this has been inherited by the packages on hex.pm. The problem with this is that when you specify riakc as a dependency in another project, the Hex package gets downloaded and the source code gets built, and since the contents of the Hex package is not a Git repo, the Git commands to get the current package version end up searching up the directory tree for a .git directory and find one in the parent project instead. Thus, in a project where the latest tag is, say, 0.3.2, the riakc.app file will get build with that version instead of the version of the riakc package (which is currently 2.5.3 for the most recent package available on hex.pm).

This doesn't cause any issues with functionality that I've encountered, but it does lead to some annoying behavior from rebar3, where it constantly thinks the riakc package is outdated and needs to be upgraded; every time I run a rebar3 command, it ends up decompressing and rebuilding the whole package from scratch all over again, which adds a bit of unnecessary delay to my day-to-day work.

I believe the correct fix for this is to simply update riakc.app.src to include the current project version directly, instead of setting it to git like we do now. This solution is slightly annoying in that it requires us to correctly maintain the vsn setting by hand for future releases, but this does seem to be the approach that most other Erlang projects take, so I think this is probably the best way forward.

I don't know who owns access rights to the source code for this project anymore; I used to have membership in the Basho org but it was suddenly revoked a few months ago, perhaps because I have not been particularly active in any of the projects recently, though I'm not really sure of the reasons. Anyway, if the current maintainers agree, I can go ahead and create a PR for this change. I've also spoken to @lukebakken who is the current publisher of this package on hex.pm, and he said he doesn't have access to change the source code anymore, but that he'd be happy to hand over ownership of the Hex package to whomever would be appropriate.

@nickelization
Copy link
Contributor Author

I've noticed same issue also exists in the riak_pb project, which gets pulled in as a dependency of this project. If switching the config to directly specify the version string is approved as a fix for this project, I'll also look at making a similar change over there.

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

No branches or pull requests

1 participant