You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes the imports utils split imports by file kinds, allowing to
make explicit decisions about what imports to use at the various
callsites
- Create `FileKind` enum to categorize gno files, with variants
`PackageSource`, `Test`, `XTest` and `Filetest`
- Create `GetFileKind` util to derive the `FileKind` from a file name
and body
- Create `ImportsMap` type that maps `FileKind`s to lists of imports. It
has a single method `Merge` to select and merge various imports from
multiple `FileKind`s
- Modify the`packages.Imports` helper to return an `ImportsMap` instead
of a `[]string` and adapt callsites by using`ImportMap.Merge` to
preserve existing behavior
This is something I need for #3304 and #2932 but to help reviews I made
an atomic PR here instead
---------
Signed-off-by: Norman Meier <[email protected]>
Co-authored-by: Morgan <[email protected]>
0 commit comments