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

misc: split dialects.utils into multiple files #3472

Merged
merged 8 commits into from
Nov 20, 2024

Conversation

superlopuh
Copy link
Member

It feels like a logical split, and leaves space for some upcoming shared dialects helpers.

@superlopuh superlopuh added the misc Miscellaneous label Nov 19, 2024
@superlopuh superlopuh self-assigned this Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.31%. Comparing base (59e59ad) to head (5980046).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3472      +/-   ##
==========================================
+ Coverage   90.29%   90.31%   +0.02%     
==========================================
  Files         462      464       +2     
  Lines       57937    58042     +105     
  Branches     5566     5562       -4     
==========================================
+ Hits        52313    52421     +108     
+ Misses       4189     4188       -1     
+ Partials     1435     1433       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Base automatically changed from sasha/snitch/move-ptr-to-utils to main November 19, 2024 13:24
@@ -1,6 +1,4 @@
from abc import ABC
from collections.abc import Iterable, Sequence
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if format is really the best name to characterise these helpers. Have you thought about further splitting them into printer utils and parsing utils?

Copy link
Member Author

Choose a reason for hiding this comment

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

These tend to be quite coupled to each other, so it made sense to keep them together. I agree that the name isn't great, but I can't think of a better one... We could also go with the irdl and ir route and ban the sub files of the utils, and expose it all via xdsl.dialects.utils

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try that quickly, will result in smaller diff and probably a better experience

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure I understand the point of the irdl approach, just seems to cause loads of linting errors for me

Copy link
Member Author

@superlopuh superlopuh Nov 20, 2024

Choose a reason for hiding this comment

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

For some reason, the local development experience is worse than for clients, Pylance automatically inserts the correct import if you pip install xdsl.

Copy link
Member Author

Choose a reason for hiding this comment

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

sorted this list

Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@superlopuh superlopuh merged commit 4b08fcd into main Nov 20, 2024
15 checks passed
@superlopuh superlopuh deleted the sasha/stream/split-dialect-utils branch November 20, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
misc Miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants