Skip to content

Conversation

@Morriar
Copy link
Contributor

@Morriar Morriar commented Jun 5, 2025

In this case, we shouldn't remove the extend T::Helpers as we still need it for mixes_in_class_methods:

module Foo
  extend T::Helpers

  mixes_in_class_methods Bar

@Morriar Morriar self-assigned this Jun 5, 2025
@Morriar Morriar requested a review from a team as a code owner June 5, 2025 16:41
@Morriar Morriar added the bugfix Fix a bug label Jun 5, 2025
Comment on lines +105 to +114
old_class_annotations = @class_annotations
@class_annotations = []
old_type_members = @type_members
@type_members = []
old_extend_t_helpers = @extend_t_helpers
@extend_t_helpers = []
old_extend_t_generics = @extend_t_generics
@extend_t_generics = []
old_seen_mixes_in_class_methods = @seen_mixes_in_class_methods
@seen_mixes_in_class_methods = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Personally, I find this style easier to follow:

Suggested change
old_class_annotations = @class_annotations
@class_annotations = []
old_type_members = @type_members
@type_members = []
old_extend_t_helpers = @extend_t_helpers
@extend_t_helpers = []
old_extend_t_generics = @extend_t_generics
@extend_t_generics = []
old_seen_mixes_in_class_methods = @seen_mixes_in_class_methods
@seen_mixes_in_class_methods = false
old_class_annotations, @class_annotations = @class_annotations, []
old_type_members, @type_members = @type_members, []
old_extend_t_helpers, @extend_t_helpers = @extend_t_helpers, []
old_extend_t_generics, @extend_t_generics = @extend_t_generics, []
old_seen_mixes_in_class_methods, @seen_mixes_in_class_methods = @seen_mixes_in_class_methods, false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it but Rubocop doesn't:

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no worries then it's good to ship already 👍

Morriar added 3 commits June 6, 2025 10:59
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar merged commit 0bfaf25 into main Jun 9, 2025
8 checks passed
@Morriar Morriar deleted the at-fix-mixes branch June 9, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants