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

Add support for specifying restate pod tolerations #11

Merged
merged 2 commits into from
Jul 12, 2024
Merged

Conversation

pcholakov
Copy link
Contributor

I tried 'just generate-pkl` but it spat out a bunch of errors at me:

❯ just generate-pkl
cargo run --bin schemagen | pkl eval crd/pklgen/generate.pkl -m crd
    Finished dev [unoptimized + debuginfo] target(s) in 0.30s
     Running `target/debug/schemagen`
–– Pkl Error ––
Cannot reference property `isUriString` from here because it is not `const`.

172 | typealias UriString = String(isUriString)
                                   ^^^^^^^^^^^
at pkl.experimental.uri.URI#path (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/pkl.experimental.uri/URI.pkl#L172-172)

To fix, do either of:
1. Add modifier `const` to property `isUriString`
2. Self-import this module, and reference this property from the import.

380 | path = pathPart
             ^^^^^^^^
at pkl.experimental.uri.URI#parse.<function#7>.path (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/pkl.experimental.uri/URI.pkl#L380-380)

159 | path
      ^^^^
at pkl.experimental.uri.URI#toString[#3] (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/pkl.experimental.uri/URI.pkl#L159-159)

154 | function toString(): String = new Listing {
                                    ^^^^^^^^^^^^^
at pkl.experimental.uri.URI#toString (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/pkl.experimental.uri/URI.pkl#L154-162)

218 | when (type is "module") { "This module was generated from the CustomResourceDefinition at <\(baseUri)>." }
                                                                                                 ^^^^^^^^^^
at k8s.contrib.crd.internal.ModuleGenerator#getDocComment[#3] (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/k8s.contrib.crd/internal/ModuleGenerator.pkl#L218-218)

216 | new Listing {
      ^^^^^^^^^^^^^
at k8s.contrib.crd.internal.ModuleGenerator#getDocComment (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/k8s.contrib.crd/internal/ModuleGenerator.pkl#L216-221)

144 | docComment = getDocComment(filteredRootSchema, "module")
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at k8s.contrib.crd.internal.ModuleGenerator#moduleNode.<function#1>.declaration.docComment (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/k8s.contrib.crd/internal/ModuleGenerator.pkl#L144-144)

60 | docComment?.render(currentIndent),
     ^^^^^^^^^^
at pkl.experimental.syntax.ModuleNode#ModuleDeclarationNode.render (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/pkl.experimental.syntax/ModuleNode.pkl#L60-60)

118 | declaration?.render(currentIndent),
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.experimental.syntax.ModuleNode#render (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/pkl.experimental.syntax/ModuleNode.pkl#L118-118)

36 | text = render("")
            ^^^^^^^^^^
at pkl.experimental.syntax.Node#output.text (https://github.com/apple/pkl-pantry/blob/[email protected]/packages/pkl.experimental.syntax/Node.pkl#L36-36)
error: Recipe `generate-pkl` failed on line 52 with exit code 1

@pcholakov pcholakov requested a review from jackkleeman July 11, 2024 14:55
@pcholakov pcholakov merged commit e01991f into main Jul 12, 2024
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.

2 participants