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

Test cached module identity #2159

Merged
merged 4 commits into from Jun 5, 2023
Merged

Conversation

unmultimedio
Copy link
Member

Test for #2152

@unmultimedio unmultimedio self-assigned this Jun 5, 2023
fileInfos, err := module.SourceFileInfos(context.Background())
require.NoError(t, err)
for _, fileInfo := range fileInfos {
require.NotNil(t, fileInfo.ModuleIdentity())
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 was a little surprised that there was no way to do module.Identity(), but I needed to loop over the files. I assume there's no way to access a module identity from a module with no proto files?

Copy link
Member

Choose a reason for hiding this comment

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

Modules always have .proto files - its invalid to have an empty module. ModuleFileSets inherit from Modules, and ModuleFileSets will have files from different Modules, meaning that you need to get identity at the file level given this inheritance.

@unmultimedio unmultimedio merged commit 78537dd into main Jun 5, 2023
7 checks passed
@unmultimedio unmultimedio deleted the jfigueroa/test-cached-module-identity branch June 5, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants