erlef / rebar3_hex

Rebar3 Hex library
Apache License 2.0
101 stars 49 forks source link

Change api domain value to binary in rebar3_hex_user #242

Closed starbelly closed 3 years ago

starbelly commented 3 years ago

The domain value for write permissions should be a binary vs an atom.

Since upgrading to hex_core 0.8.2 the domain value must be a binary instead of an atom. I say hex_core 0.8.2 as that's the only thing that has changed. It's possible something changed on hexpm side as well, regardless, it should not be an atom 😁

Edit:

It's not hex_core, hex_core still has the value defined as an atom, but it doesn't get converted, and hexpm wants a binary, not an atom. May be a bug in hex_core.

starbelly commented 3 years ago

@wojtekmach Is there a bug in hex_core either in the type spec or in protobufs? If hex_core is supposed to handle the conversion to a binary, then it's a bug bug, if it's not then it's a type spec bug.

Edit:

Reference point : https://github.com/hexpm/hex_core/blob/master/src/hex_api_key.erl#L20

wojtekmach commented 3 years ago

hex_core should standardise around ~strings~ binaries, see https://github.com/hexpm/hex_core/issues/71, so this change is definitely in the right direction.

starbelly commented 3 years ago

hex_core should standardise around ~strings~ binaries, see hexpm/hex_core#71, so this change is definitely in the right direction.

Right on, we can just tell dialyzer to ignore the this call until a new release of hex_core is done

paulo-ferraz-oliveira commented 3 years ago

I'm not keen on all the nowarn stuff, but I guess you could create an issue to review this later, lest real warnings are hidden too.

starbelly commented 3 years ago

Yeah, I'll make an issue. I'm also following the issue on hex_core.