-
Notifications
You must be signed in to change notification settings - Fork 383
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
feat(gnovm): categorize imports #3323
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Norman Meier <[email protected]>
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
This makes the imports utils split imports by file kinds, allowing to make explicit decisions about what imports to use at the various callsites
FileKind
enum to categorize gno files, with variantsCompiled
,Test
,Xtest
andFiletest
GetFileKind
util to derive theFileKind
from a file name and bodyImportsMap
type that mapsFileKind
s to lists of imports. It has a single methodMerge
to select and merge various imports from multipleFileKind
spackages.Imports
helper to return anImportsMap
instead of a[]string
and adapt callsites by usingImportMap.Merge
to preserve existing behaviorThis is something I need for #3304 and #2932 but to help reviews I made an atomic PR here instead