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

0.4.0 breaks DateTime::Parse #5

Open
zerodogg opened this issue Feb 2, 2022 · 1 comment
Open

0.4.0 breaks DateTime::Parse #5

zerodogg opened this issue Feb 2, 2022 · 1 comment
Assignees
Labels
help wanted Extra attention is needed

Comments

@zerodogg
Copy link
Contributor

zerodogg commented Feb 2, 2022

After 0.4.0 DateTime::Parse crashes with:

$ raku tzbroken
Could not find symbol '&Parse' in 'Timezones::DateTime'
  in sub MAIN at tzbroken line 5
  in block <unit> at tzbroken line 3

Reproduction script:

#!/usr/bin/env raku
use DateTime::Parse;
use DateTime::Timezones;
sub MAIN {
    my $date = DateTime::Parse.new('Sun, 06 Nov 1994 08:49:37 GMT');
    say "Should not crash";
}

Output with 0.3.9

$ raku tzbroken
Should not crash
@alabamenhu
Copy link
Owner

This almost certainly is a result of the DateTime is DateTime technique recommended by @lizmat. I'm guess it's that DateTime is DateTime { … } clears entries in the DateTime:: symbol table, but Ill need to test things out to see if I can pinpoint the cause. That said, even if that's the cause, I'm not sure of a way to fix it though — hopefully there's a way.

That said, DateTime::Parse is weird though, there doesn't seem to be a reason that it needs to inherit from DateTime.

@alabamenhu alabamenhu added bug Something isn't working help wanted Extra attention is needed and removed bug Something isn't working labels Feb 3, 2022
@alabamenhu alabamenhu self-assigned this Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants