bazel-contrib / bcr-ui

Website for the Bazel Central Registry
https://registry.bazel.build
Apache License 2.0
15 stars 8 forks source link

Fix broken compatibility level when not specified #47

Closed hanneskaeufler closed 1 year ago

hanneskaeufler commented 1 year ago

Modules such as https://registry.bazel.build/modules/apple_rules_lint don't have the compatibility_level set in their MODULE.bazel files. This is fine, since that is an optional attr with a default, see https://bazel.build/rules/lib/globals#module

However, querying for that attr returns (missing), which is parsed to NaN and leads to the dreaded "hydration error" in next js during development, and of course to nothing being rendered in the final output in prod.

Falling back to the default of 0 fixes that.