Comments (14)
You can also upgrade global plugins without removing them by doing rebar3 as global plugins upgrade
from rebar3_hex.
Can you upgrade to the latest rebar3 (3.1.1) and rebar3_hex plugin (2.5.1) and try again? This should be fixed.
from rebar3_hex.
How do you determine the version of a local rebar3_hex
? The path ~/.cache/rebar3/plugins/rebar3_hex
doesn't seem to have git history.
from rebar3_hex.
Right, it isn't a git repo. I see that rebar3 plugins list
does not include the versions... that is something we need to change in rebar3
. For now you have to look in ~/.cache/rebar3/plugins/rebar3_hex/ebin/rebar3_hex.app
from rebar3_hex.
Yes, that was a version issue. Removed ~/.cache/rebar3/plugins/
, rebuilt rebar3
, and the issue went away.
from rebar3_hex.
Thanks for the tip.
from rebar3_hex.
I'm seeing the same type of error, using OTP 19.0, rebar3 vs 3.2.0 and rebar3_hex_plugin vsn 2.5.1:
uwpro:plain_fsm uwiger$ rebar3 hex publish
===> Fetching rebar3_hex ({pkg,<<"rebar3_hex">>,<<"2.5.1">>})
===> Downloaded package, caching at /Users/uwiger/.cache/rebar3/hex/default/packages/rebar3_hex-2.5.1.tar
===> Compiling rebar3_hex
===> Verifying dependencies...
Publishing plain_fsm 1.1
Description: Plain_fsm library
Dependencies:
Included files:
/Users/uwiger/uw/me/plain_fsm/LICENSE
/Users/uwiger/uw/me/plain_fsm/NOTICE
/Users/uwiger/uw/me/plain_fsm/README.md
/Users/uwiger/uw/me/plain_fsm/include/plain_fsm.hrl
/Users/uwiger/uw/me/plain_fsm/rebar.config
/Users/uwiger/uw/me/plain_fsm/rebar.lock
/Users/uwiger/uw/me/plain_fsm/src/fsm_example.erl
/Users/uwiger/uw/me/plain_fsm/src/plain_fsm.app.src
/Users/uwiger/uw/me/plain_fsm/src/plain_fsm.erl
/Users/uwiger/uw/me/plain_fsm/src/plain_fsm_xform.erl
Maintainers:
Ulf Wiger
Licenses: Apache 2.0
Links:
Github: https://github.com/uwiger/plain_fsm
Build tools: rebar3
Before publishing, please read Hex CoC: https://hex.pm/docs/codeofconduct
Proceed? ("Y")> Y
escript: exception error: no function clause matching
rebar3_hex_pkg:errors_to_string(#{<<"version">> => <<"expected type Elixir.HexWeb.Version">>}) (/Users/uwiger/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_pkg.erl, line 220)
in function rebar3_hex_pkg:format_error/1 (/Users/uwiger/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_pkg.erl, line 59)
in call from rebar3:handle_error/1 (/Users/uwiger/git/rebar3/_build/default/lib/rebar/src/rebar3.erl, line 280)
in call from escript:run/2 (escript.erl, line 757)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
uwpro:plain_fsm uwiger$ rebar3 version
rebar 3.2.0 on Erlang/OTP 19 Erts 8.0
from rebar3_hex.
@uwiger that is a different error, i've not seen that issue before. Seems the Hex backend can't parse the version.
@ericmj ?
from rebar3_hex.
The version is "1.1". It should follow semver and be "1.1.0".
from rebar3_hex.
Ouch! That's harsh! ;-)
The error indication from the plugin could perhaps be improved, but I'll be sure to fix the version. Thanks.
from rebar3_hex.
Yea, I need it to handle that error and print a proper error message to the user. Thanks
from rebar3_hex.
Another problem (didn't think of it at first): 1.1 wasn't the latest version!
uwpro:plain_fsm uwiger$ git describe --abbrev
1.4
How is the version determined?
from rebar3_hex.
Hmm, n.m., I think I may have messed up there...
from rebar3_hex.
Aargh! The confusing part was:
uwpro:plain_fsm uwiger$ rm -rf _build
uwpro:plain_fsm uwiger$ rebar3 compile
===> Verifying dependencies...
===> Compiling plain_fsm
uwpro:plain_fsm uwiger$ grep vsn _build/default/lib/plain_fsm/ebin/plain_fsm.app
{vsn,"1.4.0"},
uwpro:plain_fsm uwiger$ rebar3 hex publish
===> Verifying dependencies...
Publishing plain_fsm 1.1
Description: Plain_fsm library
...
uwpro:plain_fsm uwiger$ git log --oneline --no-walk --tags --decorate
972e8ab (HEAD, tag: 1.4.0, tag: 1.4, origin/uw-appsrc-vsn, uw-appsrc-vsn) change hard-coded vsn in .app.src
7777f30 (tag: 1.3) Merge pull request #11 from uwiger/uw-doc-profile
d2d0c30 (tag: 1.2) Merge pull request #10 from uwiger/uw-hex-attributes
57cd15a (tag: 1.1, origin/uw-cleanup-and-copyright, uw-cleanup-and-copyright) ws cleanup + copyright fix
7c1d0bc (tag: 1.0) added virtual function, plain_fsm:current_function()
So where did the "1.1" version come from?
It was (wrongly) hard-coded in the old .app.src, and there happened to be an old plain_fsm/ebin/plain_fsm.app
on the local disk, built using rebar 2 earlier. Apparently, the hex publish picked that up, even though rebar3 compile
managed to sort it out. I recall the warnings about unpredictable consequences of having a top level ebin when using rebar3...
Removing the local ebin/ fixed the problem and (using semver versioning) publish worked.
from rebar3_hex.
Related Issues (20)
- Add an audit provider
- Add an info provider
- Standardize on raised error formats
- vendor in hex_core HOT 2
- Add developer / contributing docs
- build command should not require repo argument HOT 1
- Owner add command cannot add maintainers as documented HOT 1
- plugins upgrade don't upgrade globally installed plugins. HOT 5
- Erlang 25 (in)compatibility (due to builds being produced on Erlang 21?) HOT 3
- Conditional mix.exs deps are invalid HOT 2
- rebar3 hex docs --dry-run asking for my Local Password HOT 6
- Can't get dependency on elixir on erlang module from private repository HOT 2
- In GitHub Actions the plugin try push 0.0.0 version HOT 2
- Running the publish command with package and dry run arguments args prompts for password
- Crash while running `rebar3 hex cut` HOT 6
- Should rebar3_hex use hex_tarball:create_docs/2? HOT 1
- Crash when trying to cut pre release version HOT 5
- Support for including all files under version control in the created package HOT 2
- Consider tagging repo as `rebar3-plugin` HOT 1
- Is rebar3_hex required in modern/recent versions of rebar3? HOT 7
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 rebar3_hex.