Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created January 4, 2020 16:41
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/d1e0fd6c5916b91bca688ef2e837d853 to your computer and use it in GitHub Desktop.
Save Whateverable/d1e0fd6c5916b91bca688ef2e837d853 to your computer and use it in GitHub Desktop.
bisectable6
role A { method a() { 666 } }; class B does A { has $.a = 42; }; dd B.new.a;
Bisecting: 5439 revisions left to test after this (roughly 12 steps)
[b7ab48ee1548e55441035ee10e945a7414e300bc] Attribute.required can be anything, not just int
»»»»» Testing b7ab48ee1548e55441035ee10e945a7414e300bc
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing b07874e061503194629be9ac908d542333a3eb3a
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing ba07a62f2e8f8efcbdb1f08507f768afa414ef27
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing ac707d2ae4eb4a201e445404b03b5c2eed79396c
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing cb0bf3860455a9c60e009847a40b58de7424f824
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing c2d5c20c04c8e2b788797e1aaff581924dc370b0
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing d5a34f19f5d0ec3333d11f8bd3f9e0a2c45d3959
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 9eef0e63aff8e2c80e31eb4cded93c589822c279
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing e4efccc6c19ef852a46fca7fd4abbb9b9d74061e
»»»»» Script output:
42
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is different
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 2a4eb56a33038e6d78bcfd8834e45cca1ed997c2
»»»»» Script output:
42
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is different
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 9357eddbc113cd5ded64d05e6ca5df9856a7df2f
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 55b51a24a3f2cd6fe2bd1cddba397e84b74f2b17
»»»»» Script output:
42
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is different
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 83d26ddd763254a1babfdf1bfb50306cde2fe869
»»»»» Script output:
666
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
666
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
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