Skip to content

Commit

Permalink
Ignore version errors
Browse files Browse the repository at this point in the history
Signed-off-by: AbstractionFactory <[email protected]>
  • Loading branch information
abstractionfactory committed Oct 9, 2024
1 parent 1febab3 commit d42aadf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/internal/moduleindex/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,12 @@ func (g generator) generate(ctx context.Context, moduleList []module.Addr, block
}
for _, m := range modules.Modules {
if err := m.Validate(); err != nil {
return fmt.Errorf("invalid module (%w)", err)
// We are ignoring invalid version numbers here because the dataset contains them, but when a module is
// refreshed, it should be excluded above.
var invalidVersionNumber *module.InvalidVersionNumber
if !errors.As(err, &invalidVersionNumber) {
return fmt.Errorf("invalid module (%w)", err)
}
}
}
marshalled, err := json.Marshal(modules)
Expand Down

0 comments on commit d42aadf

Please sign in to comment.