hythm7 / Pakku

Package Manager for the Raku Programming Language
Artistic License 2.0
26 stars 3 forks source link

Dependency suprises when running Blin #22

Closed Altai-man closed 3 years ago

Altai-man commented 3 years ago

The log is:

🥞🥞 Listing some early errors
Chart::Gnuplot – CyclicDependency – Cyclic dependency detected
Sparky::Plugin::Notify::Telegram – MissingDependency – Dependency “TelegramBot” was not resolved
JSON::simd – MissingDependency – Dependency “build” was not resolved Dependency “test” was not resolved Dependency “runtime” was not resolved
Math::Primesieve – MissingDependency – Dependency “runtime” was not resolved Dependency “test” was not resolved
MoarVM::Remote – MissingDependency – Dependency “Data::MessagePack” was not resolved
Propius – MissingDependency – Dependency “TimeUnit” was not resolved
Native::Compile – MissingDependency – Dependency “test” was not resolved Dependency “runtime” was not resolved
Inline::Python – MissingDependency – Dependency “build” was not resolved Dependency “runtime” was not resolved
Distribution::Builder::MakeFromJSON – MissingDependency – Dependency “runtime” was not resolved Dependency “build” was not resolved
Farabi6 – MissingDependency – Dependency “Debugger::UI::CommandLine” was not resolved
Algorithm::LibSVM – CyclicDependency – Cyclic dependency detected
DBIx::NamedQueries – MissingDependency – Dependency “Path::Iterator” was not resolved
Foo::Dependencies::A-on-B – CyclicDependency – Cyclic dependency detected
Termbox – MissingDependency – Dependency “runtime” was not resolved Dependency “build” was not resolved
HTML::Canvas – CyclicDependency – Cyclic dependency detected
Inline::Perl5 – MissingDependency – Dependency “build” was not resolved Dependency “test” was not resolved Dependency “runtime” was not resolved
HTTP::Server::Ogre – MissingDependency – Dependency “Path::Iterator” was not resolved
DB – MissingDependency – Dependency “runtime” was not resolved Dependency “test” was not resolved
MessagePack::Class – MissingDependency – Dependency “Data::MessagePack” was not resolved
Algorithm::HierarchicalPAM – CyclicDependency – Cyclic dependency detected
CSS – CyclicDependency – Cyclic dependency detected
LibGit2 – MissingDependency – Dependency “runtime” was not resolved Dependency “test” was not resolved
Foo::Dependencies::Self – CyclicDependency – Cyclic dependency detected
HTML::Canvas::To::PDF – CyclicDependency – Cyclic dependency detected
DB::SQLite – MissingDependency – Dependency “test” was not resolved Dependency “runtime” was not resolved
Foo::Dependencies::B-on-A – CyclicDependency – Cyclic dependency detected
MeCab – CyclicDependency – Cyclic dependency detected
Trait::Enum – MissingDependency – Dependency “test” was not resolved
Geo::Hash – CyclicDependency – Cyclic dependency detected
Rakudo::Debugger – MissingDependency – Dependency “Term::ANSIColor” was not resolved
CSS::Selector::To::XPath – MissingDependency – Dependency “CSS::Grammar:ver(v0.3.3+)” was not resolved
Algorithm::LDA – CyclicDependency – Cyclic dependency detected
GPGME – MissingDependency – Dependency “runtime” was not resolved Dependency “test” was not resolved
Grammar::Modelica – MissingDependency – Dependency “Test::Meta” was not resolved
XXX – MissingDependency – Dependency “YAML” was not resolved
DBIish::Pool – MissingDependency – Dependency “DBIish<0.6.0+>” was not resolved
Native::Exec – MissingDependency – Dependency “test” was not resolved Dependency “runtime” was not resolved
Algorithm::LBFGS – CyclicDependency – Cyclic dependency detected
RogueCurses – MissingDependency – Dependency “Curses” was not resolved
LibCurl – MissingDependency – Dependency “test” was not resolved Dependency “runtime” was not resolved
DB::Pg – MissingDependency – Dependency “test” was not resolved Dependency “runtime” was not resolved
CSS::Properties – CyclicDependency – Cyclic dependency detected
PDF::Document – CyclicDependency – Cyclic dependency detected
GDBM – MissingDependency – Dependency “runtime” was not resolved Dependency “build” was not resolved
Sys::Utmp – MissingDependency – Dependency “build” was not resolved Dependency “runtime” was not resolved
Sys::Lastlog – MissingDependency – Dependency “runtime” was not resolved Dependency “build” was not resolved
Doublephone – MissingDependency – Dependency “runtime” was not resolved Dependency “build” was not resolved
UNIX::Privileges – MissingDependency – Dependency “runtime” was not resolved Dependency “build” was not resolved
HTTP::Server::Router::YAML – MissingDependency – Dependency “HTTP::Server” was not resolved
HTTP::Server::Middleware::JSON – MissingDependency – Dependency “HTTP::Server” was not resolved
HTTP::Server::Router – MissingDependency – Dependency “HTTP::Server” was not resolved
FastCGI::NativeCall – MissingDependency – Dependency “runtime” was not resolved Dependency “build” was not resolved
Device::Velleman::K8055 – MissingDependency – Dependency “runtime” was not resolved Dependency “build” was not resolved
RPi::Device::SMBus – MissingDependency – Dependency “runtime” was not resolved Dependency “build” was not resolved
Audio::Libshout – MissingDependency – Dependency “test” was not resolved Dependency “build” was not resolved Dependency “runtime” was not resolved
Audio::Encode::LameMP3 – MissingDependency – Dependency “test” was not resolved Dependency “runtime” was not resolved Dependency “build” was not resolved
Igo – MissingDependency – Dependency “build” was not resolved Dependency “runtime” was not resolved
Lumberjack – MissingDependency – Dependency “IO::MiddleMan” was not resolved
🥞 Processing

While some of them are reasonable, there are false positives, e.g.

DB::Pg – MissingDependency – Dependency “test” was not resolved Dependency “runtime” was not resolved

https://github.com/CurtTilmes/raku-dbpg/blob/master/META6.json#L13-L22 <- apparently, Pakku does not recognize this organization of dependencies.

XXX – MissingDependency – Dependency “YAML” was not resolved

How, it is available at https://modules.raku.org/search/?q=YAML

CSS::Selector::To::XPath – MissingDependency – Dependency “CSS::Grammar:ver(v0.3.3+)” was not resolved

https://github.com/css-raku/CSS-Grammar-raku/blob/master/META6.json <- it exists and the current version is 0.3.5, so should resolve clearly.

hythm7 commented 3 years ago

Actually Blin is responsible of recognizing the dependencies, since my understanding is Blin build list of modules to be tested , then recognize the dependencies and then pass the modules individually to the testing package manager (disabling resolving dependencies on the package manager side).

DB::Pg – MissingDependency – Dependency “test” was not resolved Dependency “runtime” was not resolved https://github.com/CurtTilmes/raku-dbpg/blob/master/META6.json#L13-L22 <- apparently, Pakku does not recognize this organization of dependencies.

In the above case, Blin doesn't recognize dependencies when specified in a hash organization like it's in DB::Pg, and ignores everything that is not a Str. I think the relevent code is here (Also I tested installing DB::Pg with Pakku and successfully recognized dependencies)

CSS::Selector::To::XPath – MissingDependency – Dependency “CSS::Grammar:ver(v0.3.3+)” was not resolved

In this case also Blin is not able to recognize the dependency when specified with parens, the relevant code is here
Tested locally by changing “CSS::Grammar:ver(v0.3.3+)” to “CSS::Grammar:ver<v0.3.3+>” (and calling .spec-parts method), parens failed to parse, angle brackets parsed successfully.

XXX – MissingDependency – Dependency “YAML” was not resolved

In this case, YAML is a missing dependency because the distributions Pakku searches are mirrored using crai, which decide what to archive based on the below: 1- if the github project have tags, then archive the tags. 2- if the github project doesn't have tags, then archive the master branch.

IMO crai author is doing the right thing, and github project authors need to stick to either release via tags or via the main branch, not mix both.

In the case of YAML, it has an old tag, so the master branch (which is the updated one) is ignored and not archived. (And because the tag is actually invalid, it doesn't get mirrored and Pakku can't find it.)

For YAML distribution I have manually archived the latest version from the main branch and mirrored it so it's available now and can be found by Pakku.

So for any missing dependency it would be similar case to YAML (project authors are mixing releasing via tags and from main branch) or there are issues in the META6.json file of the project that it failes to parse and get ignored by Pakku.

Altai-man commented 3 years ago

Thank you very much for this detailed analysis! Sorry to burden it on you in this manner, I blamed Pakku absolutely unreasonably here. Proceeding to do some patching and reporting!

hythm7 commented 3 years ago

@Altai-man FWIW I have added the missing dependencies shown above (apart from the "cyclic dependency detected" ones reported by Blin). the only missing dependency is HTTP::Server but that one doesn't exist in https://modules.raku.org/ or https://raku.land/.

Altai-man commented 3 years ago

Thank you very much!