Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created January 10, 2020 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/f193bc0dfa0197119e48d3aa36b25e23 to your computer and use it in GitHub Desktop.
Save Whateverable/f193bc0dfa0197119e48d3aa36b25e23 to your computer and use it in GitHub Desktop.
bisectable6
old=2019.11 new=73e98a6 use Test; my UInt %composed; role MooishAttrHOW { method compose( Mu $pkg ) { %composed{self.name}++; callsame; } }; multi trait_mod:<is> (Attribute:D $attr, :$mooish!) { $attr does MooishAttrHOW }; class Foo { has $.bar is mooish is rw }; is-deeply %composed<$!bar>, 1, "attribute composed once";
Bisecting: 208 revisions left to test after this (roughly 8 steps)
[d89a0c92d635bef320d3d798b50d9e87e6fed2bc] Preserve original type object language revision in mixin
»»»»» Testing d89a0c92d635bef320d3d798b50d9e87e6fed2bc
»»»»» Script output:
ok 1 - attribute composed once
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 0
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing bed716bed29f49cf66d8daf83fa86543fa1523eb
»»»»» Script output:
ok 1 - attribute composed once
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 0
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing b54d83b8b58f2366ec37903634db3e3395e8b072
»»»»» Script output:
not ok 1 - attribute composed once
# Failed test 'attribute composed once'
# at /tmp/aqFjJ19t2B line 1
# expected: 1
# got: 2
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 0
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 8a0742eeb3a620a553faff03babd4223b7da982a
»»»»» Script output:
ok 1 - attribute composed once
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 0
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 2a4eb56a33038e6d78bcfd8834e45cca1ed997c2
»»»»» Script output:
not ok 1 - attribute composed once
# Failed test 'attribute composed once'
# at /tmp/aqFjJ19t2B line 1
# expected: 1
# got: 2
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 0
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 83d26ddd763254a1babfdf1bfb50306cde2fe869
»»»»» Script output:
ok 1 - attribute composed once
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 0
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 037affddc25a0e2591451252380a404ba8272af8
»»»»» Script output:
ok 1 - attribute composed once
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 0
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 3450a91f39eb10365e598567a699b0f1004f8a4c
»»»»» Script output:
not ok 1 - attribute composed once
# Failed test 'attribute composed once'
# at /tmp/aqFjJ19t2B line 1
# expected: 1
# got: 2
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 0
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 55b51a24a3f2cd6fe2bd1cddba397e84b74f2b17
»»»»» Script output:
not ok 1 - attribute composed once
# Failed test 'attribute composed once'
# at /tmp/aqFjJ19t2B line 1
# expected: 1
# got: 2
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 0
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “new”
55b51a24a3f2cd6fe2bd1cddba397e84b74f2b17 is the first new commit
commit 55b51a24a3f2cd6fe2bd1cddba397e84b74f2b17
Author: Vadim Belman <vrurg@lflat.org>
Date: Wed Jan 1 21:38:04 2020 -0500
Prioritize class attributes and methods over role's
Prevent accidental overriding of class attribute accessor by a method on
role.
To get this job done the following changes are implemented:
- `ClassHOW::compose` postpones actual application of roles on after
class attributes are composed first. This way we get accessor methods
installed prior to any mixins from roles. Attributes from roles are
then getting composed later.
- To prevent atributes from being re-composed twice, they skip
composition if it's done already. (`$!composed` attribute)
- Role application is now split into two phases. To preserve application
state, `RoleToClassApplier` class is now getting instantiated. Its
`apply` method is split into two: `prepare` which collects roles to be
applied; and actually `apply` method.
- Because class attributes are now being composed before roles, they
have to be composed before multis are incorporated. Therefore,
`declares_method` method doesn't know about all the methods yet. For
the purpose of preventing installing accessors if there is a multi of
the same name, attribute composer refers to `has_multi_candidate`
method too.
:040000 040000 a5ca93f68eeeef6d8c476f49c71f63ae049946bb 68fef63f11c8ab923d9f941c4e1699a4edae031c M src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment