doc-util/main.libsonnet missed
m-messiah opened this issue · comments
Hello!
Every file in k8s-alpha (or k8s-libsonnet) starts with local d = (import 'doc-util/main.libsonnet'),
While it is used in hidden fields only it does not break jsonnet generation, but it breaks jsonnet-lint, which tries to do all the things even if they are not in use.
so the output is
k8s-alpha/1.19/_custom/rbac.libsonnet:1:11-43 couldn't open import "doc-util/main.libsonnet": no match locally or in the Jsonnet library paths
local d = import 'doc-util/main.libsonnet';
Could you please remove it from generated files or tell where we can take this file to pass to linter?
I've found it here https://github.com/jsonnet-libs/docsonnet
Yes, me too. I used to clone and paste this file to my project to avoid lint problems, but it sounds like a hack.
You can do jb install github.com/jsonnet-libs/docsonnet/doc-util
instead of pasting the file in.
docsonnet
is an optional dependency for the library and generally only used to render the documentation. The lazy nature of Jsonnet allows for it to exist without any problems at runtime, however the linting does verify imports. I would suggest not applying linting on vendored files so you don't need to chase around making issues for external libraries that may follow different linting rules.
I don't think further action is needed, so closing this issue.