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

Ruby: Add query for access paths in model editor #15503

Merged
merged 5 commits into from Feb 6, 2024

Conversation

koesie10
Copy link
Member

@koesie10 koesie10 commented Feb 1, 2024

This adds a simple query for creating a subset of valid access paths that can be used in MaD models. It's not intended to be complete, and will probably be rewritten to be a recursive query rather than this simple query.

Considerations:

  • Right now, it's a simple query that hardcodes some strings, but it should be recursive in the future.
  • In the future, it might make sense to make this a graph query (i.e. having nodes and edges query predicates), but we want to get this simple solution in first.
  • Util::pathToNode does something close to what we want, but it doesn't have the details and defType, which are really useful to have in the model editor.
  • The intention is to iterate on this query, so the most important part for now is that the query is at least correct in reporting valid access paths.

It seems like the query is also reporting Argument[self] for for example def self.self_foo. Does this make sense? It seems like the method node does return the parameter from getSelfParameter.

@koesie10 koesie10 added the no-change-note-required This PR does not need a change note label Feb 1, 2024
@github-actions github-actions bot added the Ruby label Feb 1, 2024
@koesie10 koesie10 marked this pull request as ready for review February 2, 2024 13:39
@koesie10 koesie10 requested a review from a team as a code owner February 2, 2024 13:39
hmac
hmac previously approved these changes Feb 5, 2024
@koesie10 koesie10 merged commit 8361efc into main Feb 6, 2024
21 checks passed
@koesie10 koesie10 deleted the koesie10/ruby-access-paths branch February 6, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Ruby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants