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

unexpected behaviour during EVAL() #3438

Open
p6rt opened this issue Jul 14, 2014 · 4 comments
Open

unexpected behaviour during EVAL() #3438

p6rt opened this issue Jul 14, 2014 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 14, 2014

Migrated from rt.perl.org#122289 (status was 'open')

Searchable as RT122289$

@p6rt
Copy link
Author

p6rt commented Jul 14, 2014

From @teodozjan

Evaling objects won't work if code that eval was preompiled
independently. In this case class Planet and Class SpaceStation are
somewhat inaccesible in imported sub. Even though putting slurp $path
as argument of eval will fail. It was working on parrot but before big
changes that made parrot backend unusable (random issues) in my
project.

=begin pod
  #FAILS on MOAR
  @​planets = from_file($path_planets);
  #the same as below
  # https://github.com/teodozjan/perl-store/blob/master/lib/PerlStore/FileStore.pm
  @​stations = from_file($path_stations);

=end pod

  #moar hack
  note 'Readin $path_planets';
  my $plan = slurp $path_planets;
  @​planets = EVAL $plan;

  #moar hack
  note 'Readin $path_stations';
  my $stat = slurp $path_stations;
  @​stations = EVAL $stat;

LOADING /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client
+ /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (12 - 16)
| multi sub MAIN(​:$tasks!, Bool :$update?){
|
| my Client $client .= new;
|
| create_session;
r
LOADING EVAL_0
LOADING EVAL_1
LOADING EVAL_2
+ Uncaught Exception
| Cannot invoke this object (REPR​: Null, cs = 0)
+ /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (23 - 27)
| BodyBuilder.process_all_bodies;
| } else {
| BodyBuilder.read;
| }
| for @​todo -> $willdo {
q
- Run END blocks (y/N)?

$ perl6 --version
This is perl6 version 2014.06-118-gb25b868 built on MoarVM version
2014.06-63-g0fb638b

--
Pozdrawiam

Kamil Ku�aga

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

From @AlexDaniel

Hmmm… Parrot is in the past as of today, and I wish it was possible to try this on MoarVM. What's the way to reproduce this issue?

On 2014-07-14 02​:31​:54, teodozjan wrote​:

Evaling objects won't work if code that eval was preompiled
independently. In this case class Planet and Class SpaceStation are
somewhat inaccesible in imported sub. Even though putting slurp $path
as argument of eval will fail. It was working on parrot but before big
changes that made parrot backend unusable (random issues) in my
project.

=begin pod
#FAILS on MOAR
@​planets = from_file($path_planets);
#the same as below
# https://github.com/teodozjan/perl-
store/blob/master/lib/PerlStore/FileStore.pm
@​stations = from_file($path_stations);

=end pod

#moar hack
note 'Readin $path_planets';
my $plan = slurp $path_planets;
@​planets = EVAL $plan;

#moar hack
note 'Readin $path_stations';
my $stat = slurp $path_stations;
@​stations = EVAL $stat;

LOADING /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client
+ /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (12 - 16)
| multi sub MAIN(​:$tasks!, Bool :$update?){
|
| my Client $client .= new;
|
| create_session;
r
LOADING EVAL_0
LOADING EVAL_1
LOADING EVAL_2
+ Uncaught Exception
| Cannot invoke this object (REPR​: Null, cs = 0)
+ /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (23 - 27)
| BodyBuilder.process_all_bodies;
| } else {
| BodyBuilder.read;
| }
| for @​todo -> $willdo {
q
- Run END blocks (y/N)?

$ perl6 --version
This is perl6 version 2014.06-118-gb25b868 built on MoarVM version
2014.06-63-g0fb638b

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 4, 2017

From @teodozjan

Hi Aleks,

Thanks for reminder i totally forgot about this RT.

Looks like it was fine in 2015
teodozjan/lacuna-cookbuk@f2ebae3#diff-73e69e63f060cafc548379f4dcc52105
shall i test it to be 100% sure or you want to close it?

On Sun, Dec 3, 2017 at 6​:00 AM, Aleks-Daniel Jakimenko-Aleksejev via RT <
perl6-bugs-followup@​perl.org> wrote​:

Hmmm� Parrot is in the past as of today, and I wish it was possible to try
this
on MoarVM. What's the way to reproduce this issue?

On 2014-07-14 02​:31​:54, teodozjan wrote​:

Evaling objects won't work if code that eval was preompiled
independently. In this case class Planet and Class SpaceStation are
somewhat inaccesible in imported sub. Even though putting slurp $path
as argument of eval will fail. It was working on parrot but before big
changes that made parrot backend unusable (random issues) in my
project.

=begin pod
#FAILS on MOAR
@​planets = from_file($path_planets);
#the same as below
# https://github.com/teodozjan/perl-
store/blob/master/lib/PerlStore/FileStore.pm
@​stations = from_file($path_stations);

=end pod

#moar hack
note 'Readin $path_planets';
my $plan = slurp $path_planets;
@​planets = EVAL $plan;

#moar hack
note 'Readin $path_stations';
my $stat = slurp $path_stations;
@​stations = EVAL $stat;

LOADING /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client
+ /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (12 - 16)
| multi sub MAIN(​:$tasks!, Bool :$update?){
|
| my Client $client .= new;
|
| create_session;
r
LOADING EVAL_0
LOADING EVAL_1
LOADING EVAL_2
+ Uncaught Exception
| Cannot invoke this object (REPR​: Null, cs = 0)
+ /home/kamil/dev/lacuna-cookbuk/bin/lacunacookbuk_client (23 - 27)
| BodyBuilder.process_all_bodies;
| } else {
| BodyBuilder.read;
| }
| for @​todo -> $willdo {
q
- Run END blocks (y/N)?

$ perl6 --version
This is perl6 version 2014.06-118-gb25b868 built on MoarVM version
2014.06-63-g0fb638b

--
Pozdrawiam

Kamil Ku�aga

@p6rt p6rt added the weird label Jan 5, 2020
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

1 participant