grondilu / libdigest-raku

Raku implementation of various digests
Artistic License 2.0
27 stars 42 forks source link

Docs Example Fails #40

Closed librasteve closed 7 months ago

librasteve commented 7 months ago

this example from the raku docs...

use Digest::MD5;
my $password = "password123";
my $hashed-password = Digest::MD5.new.md5_hex($password);

say $hashed-password;

fails with

~/scum > raku scum.raku
You cannot create an instance of this type (Digest::MD5)
  in block <unit> at scum.raku line 4

we are using this to install...

zef install Digest::MD5

pulls from Digest

===> Staging Digest:ver<1.1.0>:auth<zef:grondilu>
===> Staging [OK] for Digest:ver<1.1.0>:auth<zef:grondilu>
===> Testing: Digest:ver<1.1.0>:auth<zef:grondilu>
===> Testing [OK] for Digest:ver<1.1.0>:auth<zef:grondilu>
===> Installing: Digest:ver<1.1.0>:auth<zef:grondilu>

there is a chat on Discord / IRC here https://discord.com/channels/538407879980482560/768511641758466088/1234871258760478720

grondilu commented 7 months ago

Looks like a package name resolution issue that was discussed some time ago. It was messy but I thought this was resolved. I can't help much, as I'm not familiar with zef and other package management systems.

I'm willing to rename this repo appropriately though if someone suggests better names.

librasteve commented 7 months ago

please see this comment over on zef https://github.com/ugexe/zef/issues/558 ...

librasteve commented 7 months ago

Actually this issue arose in the rakuguide examples, not raku docs

Here's the fix PR https://github.com/hankache/rakuguide/pull/231

AntonOks commented 7 months ago

Looks like a package name resolution issue that was discussed some time ago. It was messy but I thought this was resolved. I can't help much, as I'm not familiar with zef and other package management systems.

I'm willing to rename this repo appropriately though if someone suggests better names.

I guess it's the Module (Sub-modul) name clash of the below modules... both provide MD5 as they offer use Digest::MD5;

Rename options could be (?):

https://github.com/cosimo/perl6-digest-md5 wasn't updated for many years. Not sure it this is ++$good or --$bad. Maybe someone could do some tests with both MD5 implementations and, depending on performance and functionality we, aka ZEF, has to decide for one and ditch the other...