tony-o / raku-fez

This project is for 'fez', raku's cool new shiny dist uploader & manager. If you're a module author you should definitely be using this sweet thang. ;;;;;;;;;;;;;; This project and the underlying infrastructure is supported out of my own pocket and through donations. If you'd like to donate please check here: https://www.patreon.com/oynot
Artistic License 2.0
20 stars 12 forks source link

zef install fez failed to install due to missing z:from<native> dependency #103

Closed kjkuan closed 1 year ago

kjkuan commented 1 year ago

I tried zef install fez but failed:

jkuan@greymatter work:[0] $ zef install fez
===> Searching for: fez
===> Searching for missing dependencies: z:from<native>
Use of Nil in string context
  in block  at /home/jkuan/Applications/rakudo-moar-2023.06-01-linux-x86_64-gcc/share/perl6/site/sources/020B1DCFD2D1C1C1948036C328066D9F71CCE234 (Zef::Repository) line 143
Use of Nil in string context
  in block  at /home/jkuan/Applications/rakudo-moar-2023.06-01-linux-x86_64-gcc/share/perl6/site/sources/020B1DCFD2D1C1C1948036C328066D9F71CCE234 (Zef::Repository) line 143
Use of Nil in string context
  in block  at /home/jkuan/Applications/rakudo-moar-2023.06-01-linux-x86_64-gcc/share/perl6/site/sources/020B1DCFD2D1C1C1948036C328066D9F71CCE234 (Zef::Repository) line 143
===> Failed to find dependencies: z:from<native>
Failed to resolve some missing dependencies (use e.g. --exclude="z" to skip)
kjkuan commented 1 year ago

NOTE: The installation succeeded once I added --exclude="z" to the zef install command.

tony-o commented 1 year ago

@kjkuan i'm not sure this is a bug with fez, the dependency should be z in the META and this might be worth reporting on zef

AntonOks commented 1 year ago
  1. same on Windows btw:

    PS> zef install fez
    ===> Searching for: fez
    ===> Searching for missing dependencies: z:from<native>
    Use of Nil in string context
    in sub warn at 'SETTING::'src/core.c/control.pm6 line 269
    Use of Nil in string context
    in sub warn at 'SETTING::'src/core.c/control.pm6 line 269
    Use of Nil in string context
    in sub warn at 'SETTING::'src/core.c/control.pm6 line 269
    ===> Failed to find dependencies: z:from<native>
    Failed to resolve some missing dependencies (use e.g. --exclude="z" to skip)
  2. Where does the required dependency "z:from\<native>" live? If ZEF cannot find it, who could? ;)

  3. And if FEZ can only be installed by excluding "z", how much sense does it make to have it defined as a requirement? :O

tony-o commented 1 year ago

@AntonOks this is a bug downstream and the dependency should be declared as fez depends on libz. This bug should be reported downstream of this repo, particularly because this repo ships with libz for windows and it does definitely exist.

This use case is an edge case we've been trying to get right for a while and have been trying to get module authors to correctly report libs required. Removing the dependency declaration might make it install but then the question is why can't fez run without libz and the 100 bug reports that come along with that.

AntonOks commented 1 year ago

@tony-o thanks, but sorry, I still don't really get you. Maybe it's because I don't understand what the "z:from\<native>" does or should do exactly....

When you say "downstream", you mean "zef"? Or.... Which repo ships with "libz for Windows"? And, sorry but again, me as many others just want to instll this module (on Windows, ok) as descibet in the docu, and as "fez" requires "libz", "fez" should either bring it along or somehow "zef" need to be able to resolve this dependency and install it... or die as it currently does. But then again, the hole thing somehow makes little sense and there will be such "issues" opened and people left confused...

tony-o commented 1 year ago

@tony-o thanks, but sorry, I still don't really get you. Maybe it's because I don't understand what the "z:from" does or should do exactly....

no worries.

When you say "downstream", you mean "zef"? Or....

yes, this should be handled in zef or we should stop parsing this there.

Which repo ships with "libz for Windows"? And, sorry but again, me as many others just want to instll this module (on Windows, ok) as descibet in the docu, and as "fez" requires "libz", "fez" should either bring it along or somehow "zef" need to be able to resolve this dependency and install it... or die as it currently does. But then again, the hole thing somehow makes little sense and there will be such "issues" opened and people left confused...

Fez ships with libz for windows, the fact that it cannot be found in the installer is a bug there. Removing libz as a dependency will cause tickets to come from *nix/osx users since they need libz installed already and they'll receive no error that libz isn't available until they try to run fez.

AntonOks commented 1 year ago

When you say "downstream", you mean "zef"? Or....

yes, this should be handled in zef or we should stop parsing this there.

would it then make sense to collaborate with the "zef dev's" to improve here somehow?

Which repo ships with "libz for Windows"? And, sorry but again, me as many others just want to instll this module (on Windows, ok) as descibet in the docu, and as "fez" requires "libz", "fez" should either bring it along or somehow "zef" need to be able to resolve this dependency and install it... or die as it currently does. But then again, the hole thing somehow makes little sense and there will be such "issues" opened and people left confused...

Fez ships with libz for windows, the fact that it cannot be found in the installer is a bug there. Removing libz as a dependency will cause tickets to come from *nix/osx users since they need libz installed already and they'll receive no error that libz isn't available until they try to run fez.

I guess you refer to https://github.com/tony-o/raku-fez/blob/master/resources/lib/z.dll, right?

So, as FEZ ships with a Windows library, without knowing where this one comes from [compiled by you | someone else or downloaded from "their side"? ].... could we do the same with {static] *nix/osx lib's, if there are any available on "their side"? And if so, would this solve the dependency?

tony-o commented 1 year ago

@AntonOks nick and i are the maintainers for zef but it'd be helpful if this bug lived in zef's repo. that said, i'd accept a PR to get rid of the zlib dependency altogether but i'm not able to get to it until i'm done migrating the zef eco server code as AWS is deprecating the mechanism it uses in january

@AntonOks the goal is portability for those and it would make sense to also include z.so and z.dylib

tony-o commented 1 year ago

for now i'm going to close this issue, i have another tracking this need. i've removed the dep from the META and added a note in the soon to be updated README

AntonOks commented 1 year ago

for now i'm going to close this issue, i have another tracking this need. i've removed the dep from the META and added a note in the soon to be updated README

@tony-o Is your "tracking" somehow public? Can I also track / watch / subscribe to it? Thanks for the made changes!

I'll be back with another wish / query... it's about "git tag"ging the FEZ releases :O because I'd like to add this module to Rakudo Star...