pmqs / Archive-SimpleZip

Raku Module to Write Zip files
Artistic License 2.0
1 stars 5 forks source link

zef install error #7

Open hutou opened 3 months ago

hutou commented 3 months ago

Hi, Got this error message while trying to install from zef:

$ zef install Archive::SimpleZip
===> Searching for: Archive::SimpleZip
===> Searching for missing dependencies: CompUnit::Util, Compress::Zlib, Compress::Zlib::Raw
===> Staging CompUnit::Util:ver<0.6.0>
===> Staging [OK] for CompUnit::Util:ver<0.6.0>
===> Staging Compress::Zlib::Raw:ver<1.0.1>
===> Staging [OK] for Compress::Zlib::Raw:ver<1.0.1>
===> Staging Compress::Zlib:ver<1.1.0>
===> Staging [OK] for Compress::Zlib:ver<1.1.0>
===> Staging Archive::SimpleZip:ver<0.8.0>:auth<zef:pmqs>
===> Staging [OK] for Archive::SimpleZip:ver<0.8.0>:auth<zef:pmqs>
===> Testing: CompUnit::Util:ver<0.6.0>
[CompUnit::Util] # Failed test 'all-loaded finds the correct units'
[CompUnit::Util] # at t/01-utils.t line 14
[CompUnit::Util] # You failed 1 test of 17
===> Testing [FAIL]: CompUnit::Util:ver<0.6.0>
Aborting due to test failure: CompUnit::Util:ver<0.6.0> (use --force-test to override)
pmqs commented 3 months ago

Hmm, just kicked off the GitHub workflow to test with the latest Raku it has available (2024.05) and it ran fine -- see https://github.com/pmqs/Archive-SimpleZip/actions/runs/9522975460 for the results.

Also my Linux dev box is running an older version of Raku, namely 2023.08, and again it worked fine.

What OS are you running? and what version of Raku?

hutou commented 3 months ago

My OS is Linux

$ uname -a
Linux xps15al 6.9.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 x86_64 GNU/Linux

and Raku version is:

$ raku -v
Welcome to Rakudo™ v2024.05.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2024.05.

I also read this:

warning this module relies on unspec'd rakudo internals and can (and has and will) break without warning.

on https://github.com/LLFourn/p6-CompUnit-Util !!!

So I re-ran zef with the --force-test option:

$ zef install Archive::SimpleZip --force-test
===> Searching for: Archive::SimpleZip
===> Searching for missing dependencies: CompUnit::Util, Compress::Zlib, Compress::Zlib::Raw
===> Staging CompUnit::Util:ver<0.6.0>
===> Staging [OK] for CompUnit::Util:ver<0.6.0>
===> Staging Compress::Zlib::Raw:ver<1.0.1>
===> Staging [OK] for Compress::Zlib::Raw:ver<1.0.1>
===> Staging Compress::Zlib:ver<1.1.0>
===> Staging [OK] for Compress::Zlib:ver<1.1.0>
===> Staging Archive::SimpleZip:ver<0.8.0>:auth<zef:pmqs>
===> Staging [OK] for Archive::SimpleZip:ver<0.8.0>:auth<zef:pmqs>
===> Testing: CompUnit::Util:ver<0.6.0>
[CompUnit::Util] # Failed test 'all-loaded finds the correct units'
[CompUnit::Util] # at t/01-utils.t line 14
[CompUnit::Util] # You failed 1 test of 17
===> Testing [FAIL]: CompUnit::Util:ver<0.6.0>
[CompUnit::Util] Failed to get passing tests, but continuing with --force-test
===> Testing: Compress::Zlib::Raw:ver<1.0.1>
===> Testing [OK] for Compress::Zlib::Raw:ver<1.0.1>
===> Testing: Compress::Zlib:ver<1.1.0>
===> Testing [OK] for Compress::Zlib:ver<1.1.0>
===> Testing: Archive::SimpleZip:ver<0.8.0>:auth<zef:pmqs>
===> Testing [OK] for Archive::SimpleZip:ver<0.8.0>:auth<zef:pmqs>
===> Installing: CompUnit::Util:ver<0.6.0>
===> Installing: Compress::Zlib::Raw:ver<1.0.1>
===> Installing: Compress::Zlib:ver<1.1.0>
===> Installing: Archive::SimpleZip:ver<0.8.0>:auth<zef:pmqs>

Then I tried using the library on an existing zip file, but could not find how to display archive contents ! The following simple code does compile.

use v6;
use Archive::SimpleZip;

my $z = SimpleZip.new: "test.zip";
say $z.^methods

(I discovered Raku and its ecosystem only a few days ago!)

pmqs commented 3 months ago

Good to hear you got it working and thanks for the note about CompUnit::Util.

Regarding using this module to read zip file, you are out of luck. This module can only write zip file.

Shout if you still want to use my module and are still having problems.

tbrowder commented 1 month ago

Use GNU 'unzip' to check the zip archive. Just like zip, though, the options are not real helpful. This worked for me to simply check the contents:

$ unzip -l ziparchive # lists but doesn't overwrite