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

Type::Library declare: Unshadow $t, allowing outer $t to be modified #58

Merged
merged 1 commit into from Aug 4, 2020

Conversation

merrilymeredith
Copy link
Contributor

Hi again! This one I'm afraid I don't have a test for; a coworker pointed it out to me and I didn't want it to get lost. It looks like a stray 'my' was left here, shadowing the outer $t so this block doesn't have an effect.

I think we tripped it when a namespace::clean was placed after the -declare, which doesn't make sense anyway, as those declared types aren't supposed to be removed. One would expect a busted type library in that case, it just happened to work fine with an older Type::Tiny. We fixed that, but this line still stood out as "is this right?"

@codecov
Copy link

codecov bot commented Aug 3, 2020

Codecov Report

Merging #58 into master will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #58   +/-   ##
=======================================
  Coverage   88.78%   88.78%           
=======================================
  Files          36       36           
  Lines        3583     3583           
  Branches      984      984           
=======================================
  Hits         3181     3181           
  Misses         62       62           
  Partials      340      340           
Impacted Files Coverage Δ
lib/Type/Library.pm 86.22% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 492426d...0d272a5. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.602% when pulling 0d272a5 on merrilymeredith:fix-type-library-declare into 492426d on tobyink:master.

@tobyink tobyink merged commit b32b2a0 into tobyink:master Aug 4, 2020
clrpackages pushed a commit to clearlinux-pkgs/perl-Type-Tiny that referenced this pull request Aug 27, 2020
… version 1.010003

1.010003	2020-08-08	The Crazy 88

 [ Bug Fixes ]
 - ClassName type constraint should treat empty @isa as if no @isa were
   defined, like Type::Tiny::XS.
   Fixes RT#132583.
   Szymon Nieznański++
   <https://rt.cpan.org/Ticket/Display.html?id=132583>
 - Fix for Type::Tiny->can called as a class method.
   Meredith Howard++
   <tobyink/p5-type-tiny#57>
 - Fix predeclared types in Type::Library.
   Meredith Howard++
   <tobyink/p5-type-tiny#58>

(NEWS truncated at 15 lines)
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Sep 7, 2020
1.010006	2020-09-04

 [ Bug Fixes ]
 - Eliminate recusion warnings when Type::Parser needs to parse complex
   types.
   Fixes RT#121957.
   Diab Jerius++
   <https://rt.cpan.org/Ticket/Display.html?id=121957>

 [ Other ]
 - Better handling of coercions for pre-declared types in Type::Library.
   The type objects created before the type was properly defined will now
   lazily attempt to find coercions from the properly defined type once it
   becomes available.

1.010005	2020-08-26

 - Improvements to $AvoidCallbacks support for
   Type::Tiny::{Class,Role,Duck,Enum,Union,Intersection}, and LaxNum, Ref,
   RegexpRef, FileHandle, Object, Overload, and Tied types from
   Types::Standard.

1.010004	2020-08-18

 [ Bug Fixes ]
 - Fix XSifying Enum[] where the strings contain certain non-word
   characters.
   Andrew Ruder++
   <tobyink/p5-type-tiny-xs#12>
   <tobyink/p5-type-tiny#59>
 - Type::Params compile_named using both the head and named_to_list options
   would cause compilation error.
   Fixes RT#132419.
   Hauke D++
   Sandor Patocs++
   <https://rt.cpan.org/Ticket/Display.html?id=132419>
 - Workaround RT#121957 by avoiding attempting to XSify Enum type
   constraints with more than 50 possible strings.
   Fixes RT#121957.
   Diab Jerius++
   <https://rt.cpan.org/Ticket/Display.html?id=121957>

 [ Documentation ]
 - Link to HTTPS version of Type::Tiny web page.

1.010003	2020-08-08	The Crazy 88

 [ Bug Fixes ]
 - ClassName type constraint should treat empty @isa as if no @isa were
   defined, like Type::Tiny::XS.
   Fixes RT#132583.
   Szymon Nieznański++
   <https://rt.cpan.org/Ticket/Display.html?id=132583>
 - Fix for Type::Tiny->can called as a class method.
   Meredith Howard++
   <tobyink/p5-type-tiny#57>
 - Fix predeclared types in Type::Library.
   Meredith Howard++
   <tobyink/p5-type-tiny#58>

 [ Documentation ]
 - Document some edge cases for Types::Standard Int.
   <https://rt.cpan.org/Ticket/Display.html?id=132754>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants