There's a bit of odd behavior with the v2021.10-29-g580b3ba79
of Raku:
Again, I'm using my unreleased p6-GLib
1 for examples:
If I run this code in the project directory:
./p6gtkexec -e 'use GLib::Roles::Pointers; use File::Find; \
for find( \
dir > "lib", exclude => { / "Raw" | "Roles" | ".precomp" | ".ref-bak" | "Compat" | "Class" | "Object" | ".bak" /}).sort( \
*.basename \
) { \
my $f = .absolute.subst($*CWD, "").subst("/lib/", "").subst(".pm6", "").subst("/", "::"); \
next unless $f.contains("::"); print $f; require ::("$f"); my \o = ::("$f"); print " ({o.^name}) "; \
unless +o.^attributes { print "\n"; next; }; \
say " -----> { findProperImplementor(o.^attributes).type.^shortname }" }'
I get the following output:
GLib::Array (GLib::Array) -----> GArray
GLib::AsyncQueue (GLib::AsyncQueue) -----> GAsyncQueue
GLib::Base64 (GLib::Base64)
GLib::BookmarkFile (GLib::BookmarkFile) -----> GBookmarkFile
GLib::ByteArray (GLib::ByteArray) -----> GByteArray
GLib::Bytes (GLib::Bytes) -----> GBytes
GLib::Checksum (GLib::Checksum) -----> GChecksum
GLib::Cond (GLib::Cond) -----> GCond
GLib::Convert (GLib::Convert)
GLib::Date (GLib::Date) -----> GDate
GLib::DateTime (GLib::DateTime) -----> GDateTime
GLib::Env (GLib::Env)
GLib::Error (GLib::Error) -----> GError
GLib::FileUtils (GLib::FileUtils)
GLib::GList (GLib::GList) -----> GList
GLib::GSList (GLib::GSList) -----> GSList
GLib::HMAC (GLib::HMAC) -----> GHmac
GLib::HashTable»»»»»»
» Please note that the objects in /home/cbwood/Projects/p6-GLib/lib/GLib/HashTable.pm6 (GLib::HashTable) are classed as use-at-your-own-risk!
» Accessing an object created from C should be usable, but creating objects of
» this type, via Raku, may behave erratically.
»»»»»»
(GLib::HashTable) -----> GHashTable
GLib::Hostname (GLib::Hostname)
GLib::IOChannel (GLib::IOChannel) -----> GIOChannel
GLib::KeyFile (GLib::KeyFile) -----> GKeyFile
GLib::Log (GLib::Log)
GLib::MainContext (GLib::MainContext) -----> GMainContext
GLib::MainLoop (GLib::MainLoop) -----> GMainLoop
GLib::MappedFile (GLib::MappedFile) -----> GMappedFile
GLib::Markup (GLib::Markup) -----> GMarkupParseContext
GLib::MatchInfo (GLib::MatchInfo) -----> GMatchInfo
GLib::Memory (GLib::Memory)
GLib::Module (GLib::Module) -----> GModule
GLib::Mutex (GLib::Mutex) -----> GMutex
GLib::Node (GLib::Node) -----> GNode
GLib::Pattern (GLib::Pattern) -----> GPatternSpec
GLib::PtrArray (GLib::PtrArray) -----> GPtrArray
GLib::Quark (GLib::Quark)
GLib::Queue (GLib::Queue) -----> GQueue
GLib::Rand (GLib::Rand) -----> GRand
GLib::Regex (GLib::Regex) -----> GRegex
GLib::Scanner (GLib::Scanner) -----> GScanner
GLib::Sequence (GLib::Sequence) -----> GSequence
GLib::Signal (GLib::Signal)
GLib::Slice (GLib::Slice)
GLib::Source (Failure) -----> int
GLib::Spawn (GLib::Spawn)
GLib::String (GLib::String) -----> GString
GLib::Test (GLib::Test)
GLib::ThreadPool (GLib::ThreadPool) -----> GThreadPool
GLib::TimeZone (Failure) -----> int
GLib::Timeout (GLib::Timeout)
GLib::Timer (GLib::Timer) -----> GTimer
GLib::Tree (GLib::Tree) -----> GTree
GLib::URI (GLib::URI)
GLib::UUID (GLib::UUID)
GLib::Unicode (GLib::Unicode)
GLib::Utils (GLib::Utils)
GLib::Value (Failure) -----> int
GLib::Variant (GLib::Variant) -----> GVariant
GLib::VariantDict (GLib::VariantDict) -----> GVariantDict
GLib::VariantIter (GLib::VariantIter) -----> GVariantIter
GLib::VariantType (Failure) -----> int
So why am I getting Failure results from only some. Is this some error that is occurring due to the number of compunits I am loadnig, dynamically?
Indeed, if I take the last few, and load them first...
./p6gtkexec -e 'use GLib::Roles::Pointers; \
for <GLib::Source GLib::TimeZone GLib::Value> -> $f { \
print $f; require ::("$f"); my \o = ::("$f"); print " ({o.^name}) "; \
unless +o.^attributes { print "\n"; next; }; \
say " -----> { findProperImplementor(o.^attributes).type.^shortname }" }'
...things look fine:
GLib::Source (GLib::Source) -----> GSource
GLib::TimeZone (GLib::TimeZone) -----> GTimeZone
GLib::Value (GLib::Value) -----> GValue
So does anyone know what it is I've done to cause this problem?
Thanks!
1 - unreleased due to lack of CURI support for large project installs
Here is the RAKUDO_MODULE_DEBUG output for the first script. This will be in 6 parts!
(1 / 6)