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

Generate tags for methods defined in blocks #105

Merged
merged 3 commits into from
May 18, 2023

Conversation

tycooon
Copy link
Contributor

@tycooon tycooon commented Apr 26, 2020

As discussed here: #94 (comment)

Now this code will generate tags:

some_cool_dsl_method do
  def my_method
    # ...
  end
end

Tested in some big projects, seems to work.

Update: also contains fix from #79 since basically it requires that change.

@tycooon tycooon force-pushed the parse-methods-in-calls branch from a58aaff to 1e200dd Compare April 26, 2020 13:20
@mislav mislav force-pushed the parse-methods-in-calls branch from e0723c8 to 8e034e8 Compare May 5, 2020 09:28
@mislav
Copy link
Collaborator

mislav commented May 5, 2020

Thank you! I've amended the test to include some failing cases, could you look at that?

Basically, things like define_method and attr_accessor should not generate any tags if they are called with dynamic arguments (a variable or a string interpolated at runtime)

I've also brought in the actual commit from #79 to preserve attribution 💖

@tycooon
Copy link
Contributor Author

tycooon commented May 5, 2020

Hmm, do you have any ideas how this could be fixed? 🤔

@mislav
Copy link
Collaborator

mislav commented May 5, 2020

Not at the moment! But when they are not in the block scope, define_method and attr_accessor already work as desired (they don't generate tags for dynamic arguments); so I would argue that this regression is something specific to the block scope mode.

@vittorius
Copy link

@mislav Do you still maintain this project at this moment? If yes, what kind of effort and/or help is still needed to push this PR through review and into the master?

@mislav mislav force-pushed the parse-methods-in-calls branch from 75e8fcc to 169996f Compare May 18, 2023 12:54
@mislav mislav merged commit b1ece9b into tmm1:master May 18, 2023
@vittorius
Copy link

Yay, thanks, guys! 🎉

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.

4 participants