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

Using Hash::Merge breaks use of object hashes in programs using it #1

Closed
jnthn opened this issue Mar 8, 2018 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@jnthn
Copy link

jnthn commented Mar 8, 2018

The issue:

$ perl6 -e 'use Hash::Merge; my %h{Any}'
===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)

I golfed this down from a crash in an application that is using Config, which in turn depends on Hash::Merge, and was exploding on a use of classify. The classify method uses object hashes, which no longer work after a use of this module, as shown above.

In general, modules that use MONKEY-TYPING should also do no precompilation, since it's not possible to load two precompiled modules that monkey-patch the same type in the same program.

Really, Rakudo should be taking a use MONKEY-TYPING as implying no precompilation. Even then, I think there's still a separate bug. I will file a Rakudo issue about this, and see if something can be fixed at that level (both the implied no precompilation and the issue that leads to the null invocation error seen here).

In the meantime, a release of this module that adds no precompilation would provide relief for those who want to use Config; if it helps, I can provide a PR to add that one line.

@Tyil
Copy link
Member

Tyil commented Mar 14, 2018

Thanks for reporting the issue, @jnthn!

I will make a fix for this later today, and make a new release for it on CPAN shortly after that.

@Tyil Tyil added this to the 0.2.0 milestone Mar 14, 2018
Tyil added a commit that referenced this issue Mar 14, 2018
@Tyil Tyil closed this as completed in #4 Mar 14, 2018
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

2 participants