Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompUnit::Repository::Installation.files appears to be broken #4820

Closed
p6rt opened this issue Dec 4, 2015 · 4 comments
Closed

CompUnit::Repository::Installation.files appears to be broken #4820

p6rt opened this issue Dec 4, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 4, 2015

Migrated from rt.perl.org#126806 (status was 'new')

Searchable as RT126806$

@p6rt
Copy link
Author

p6rt commented Dec 4, 2015

From @jonathanstowe

Hi,
I was just looking to update some of my modules that were using @​*INC to find there native parts and discovered this. It appears that parts of panda may be similarly afflicted.

[jonathan@​cannibal p6-Sys-Utmp]$ perl6 -e 'for $*REPO.repo-chain -> $v { say $v.perl; say $v.files("foo").perl }'
CompUnit​::Repository​::Installation.new('/home/jonathan/.perl6/2015.11-347-g47d2daf')
Cannot unbox a type object
  in block <unit> at -e​:1

This will, as far as I understand it, need to work in order for modules to be able to find native .so files they are providing for themselves.

@p6rt
Copy link
Author

p6rt commented Dec 4, 2015

From @jonathanstowe

It seems that this is

https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Installation.pm#L198

I'm not sure whether $name should be defined or should be set to some sensible default,

@p6rt p6rt added the Bug label Jan 5, 2020
@usev6
Copy link

usev6 commented Feb 19, 2023

Just for the record, this is probably the stable link to the relevant line: https://github.com/rakudo/rakudo/blob/104623a21a/src/core/CompUnit/Repository/Installation.pm#L198

The whole class CompUnit::Respository::Installation has been changed a lot over the last years.

I can't reproduce the error with a current Rakudo. (I've added a conditional to the last say, because there would be an error that CompUnit::Repository::AbsolutePath doesn't have a method files.)

$ ./rakudo-m -e 'for $*REPO.repo-chain -> $v { say $v.raku; say $v.files("foo").raku if $v.isa(CompUnit::Repository::Installation) }'
CompUnit::Repository::Installation.new(prefix => "/home/christian/.raku")
Empty
CompUnit::Repository::Installation.new(prefix => "/path/to/rakudo.moar/gen/build_rakudo_home/site")
Empty
CompUnit::Repository::Installation.new(prefix => "/path/to/rakudo.moar/gen/build_rakudo_home/vendor")
Empty
CompUnit::Repository::Installation.new(prefix => "//path/to/rakudo.moar/gen/build_rakudo_home/core")
Empty
CompUnit::Repository::AbsolutePath.new(next-repo => CompUnit::Repository::NQP.new(next-repo => CompUnit::Repository::Perl5.new(next-repo => CompUnit::Repository)))
CompUnit::Repository::NQP.new(next-repo => CompUnit::Repository::Perl5.new(next-repo => CompUnit::Repository))
CompUnit::Repository::Perl5.new(next-repo => CompUnit::Repository)

IMHO this is closable without adding a test. If you think otherwise, please reopen (or ideally add such a test).

@usev6 usev6 closed this as completed Feb 19, 2023
@jonathanstowe
Copy link

As you say there is a lot of water under the bridge since then. With the application of a ?on the call to files then it works fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants