-
Notifications
You must be signed in to change notification settings - Fork 79
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
core: Parse module
correctly when allow-unregistered-dialect
is set
#3669
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing🥳 thank you!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3669 +/- ##
=======================================
Coverage 91.29% 91.29%
=======================================
Files 466 466
Lines 58332 58354 +22
Branches 5638 5639 +1
=======================================
+ Hits 53253 53276 +23
Misses 3629 3629
+ Partials 1450 1449 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, but I'm wondering whether we could simplify things by passing the dialect stack to get_optional_op
directly, avoiding the creation of extra ops?
Sounds good, I knew there was something I didn't like about my solution |
…ct` is set" This reverts commit b5c51ea.
I've rewritten it with @superlopuh suggestion. This didn't quite fix the needless creation of unregistered ops so I've moved some things to a helper function. Also added 2 unit tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
|
||
assert ctx.get_optional_op("dummy", dialect_stack=("test",)) == DummyOp | ||
op_type = ctx.get_optional_op("dummy2", dialect_stack=("test",)) | ||
print(op_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please open a mini PR removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixes #3668