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

Putting 'use lib' after 'use DBIish' causes lookup of the symbol DBError to fail in Rakudo #5212

Open
p6rt opened this issue Apr 5, 2016 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 5, 2016

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

Searchable as RT127839$

@p6rt
Copy link
Author

p6rt commented Apr 5, 2016

From @masak

<masak> ok, camelia isn't enough to confirm this, so if I could ask
someone to double-check my (now-golfed) bug​:
<masak> the program `use DBIish; DBIish.connect("Pg")` gives the error
`No such method 'trans' for invocant of type 'Any'` (which is correct
as far as that goes)
<masak> but `use DBIish; use lib "lib"; DBIish.connect("Pg")` gives
`===SORRY!=== Could not locate compile-time value for symbol DBError`
<masak> I have DBIish installed very normally, via panda
<ZoffixW> masak, yup​: http://fpaste.scsys.co.uk/509608

(the paste is just a reproduction of the above problem, but for
completeness it follows below)

$ perl6 -e 'use DBIish; DBIish.connect("Pg")'
No such method 'trans' for invocant of type 'Any'
  in block at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/F51B76EA668B2C3E5C8704F71C1F2DD75D6CCF4B
(DBIish) line 46
  in any at /home/zoffix/.perl6/precomp/CCCEB6AE282B8A3EB6E4E1D3C99524D2AACC3242.1459176575.85605/F5/F51B76EA668B2C3E5C8704F71C1F2DD75D6CCF4B
line 1
  in sub quote-and-escape at
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/6772E9809937053232EECE83E0797621A638FF7F
(DBDish​::Pg) line 60
  in block at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/6772E9809937053232EECE83E0797621A638FF7F
(DBDish​::Pg) line 71
  in method connect at
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/6772E9809937053232EECE83E0797621A638FF7F
(DBDish​::Pg) line 68
  in method connect at
/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/F51B76EA668B2C3E5C8704F71C1F2DD75D6CCF4B
(DBIish) line 50
  in block <unit> at -e line 1

$ perl6 -e 'use DBIish; use lib "lib"; DBIish.connect("Pg")'
===SORRY!===
Could not locate compile-time value for symbol DBError

<masak> ZoffixW++
* masak submits rakudobug
<masak> this also immediately suggests a temporary workaround​: I just
need to inline my module from lib/ :/
<jnthn> masak​: Does putting the "use lib" *first* help?
<jnthn> masak​: Note you probably should anyway, 'cus putting "use lib"
*after* modules have been loaded forces pre-comp to be disabled, iirc
<masak> jnthn​: yes, putting `use lib` before `use DBIish` makes the bug go away
<masak> perhaps the bug is even related to precompilation being forced off?
<jnthn> Perhaps, dunno

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @zoffixznet

The bug appears to be still present, but the errors are different now​:

zoffix@​VirtualBox​:~$ perl6 -v
This is Rakudo version 2016.06-154-g55c359e built on MoarVM version 2016.06-9-g8fc21d5
implementing Perl 6.c.
zoffix@​VirtualBox​:~$ perl6 -e 'use DBIish; say DBIish.^ver'
v0.5.9
zoffix@​VirtualBox​:~$ perl6 -e 'use DBIish; DBIish.connect("Pg")'
DBDish​::Pg​: Can't connect​: could not connect to server​: No such file or directory
  Is the server running locally and accepting
  connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
(1)
  in block at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F (DBIish) line 41
  in any at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/precomp/3049E2AAFCE8DCFE0FDC9837362EE6B970C782F6.1467860311.49528/C7/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F line 1
  in method connect at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/82A6A4179D7B87158A44084306D9CBFF50ED0FE6 (DBDish​::Pg) line 79
  in method connect at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F (DBIish) line 45
  in block <unit> at -e line 1

zoffix@​VirtualBox​:~$ perl6 -e 'use DBIish; use lib "lib"; DBIish.connect("Pg")'
===SORRY!===
Already have initializer for '$*DBI-DEFS' ('6.c')
zoffix@​VirtualBox​:~$

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

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

@p6rt p6rt added the Bug 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