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

Docs go example doesn't compile #530

Open
VenelinMartinov opened this issue Oct 24, 2023 · 0 comments
Open

Docs go example doesn't compile #530

VenelinMartinov opened this issue Oct 24, 2023 · 0 comments
Labels
area/docs Improvements or additions to documentation kind/bug Some behavior is incorrect or out of spec

Comments

@VenelinMartinov
Copy link
Contributor

VenelinMartinov commented Oct 24, 2023

What happened?

The example for WorkerScript here doesn't compile correctly:

    # cloudflare_program
    ./main.go:39:15: cannot use readFileOrPanic("script.js") (value of type pulumi.StringPtrInput) as pulumi.StringInput value in struct literal: pulumi.StringPtrInput does not implement pulumi.StringInput (missing method ToStringOutput)
    ./main.go:55:12: cannot use pulumi.Any(_var.Secret_foo_value) (value of type pulumi.AnyOutput) as pulumi.StringInput value in struct literal: pulumi.AnyOutput does not implement pulumi.StringInput (missing method ToStringOutput)
    ./main.go:55:23: undefined: _var
    ./main.go:61:14: cannot use filebase64OrPanic("example.wasm") (value of type pulumi.StringPtrInput) as pulumi.StringInput value in struct literal: pulumi.StringPtrInput does not implement pulumi.StringInput (missing method ToStringOutput)

    warning: using pulumi-language-go from $PATH at /opt/homebrew/bin/pulumi-language-go
    warning: using pulumi-language-go from $PATH at /opt/homebrew/bin/pulumi-language-go
    error: error in compiling Go: unable to run `go build`: exit status 1

Example

Initiate a new pulumi program with the go template.
Paste the example from the page above.
Run pulumi up.
Observe the failure.

Output of pulumi about

pulumi about
warning: using pulumi-language-go from $PATH at /opt/homebrew/bin/pulumi-language-go
warning: using pulumi-language-go from $PATH at /opt/homebrew/bin/pulumi-language-go
CLI
Version      3.89.1-dev.0
Go Version   go1.21.3
Go Compiler  gc

Plugins
NAME        VERSION
cloudflare  5.13.0
cloudflare  3.6.0
go          unknown

Host
OS       darwin
Version  13.5
Arch     arm64

This project is written in go: executable='/opt/homebrew/bin/go' version='go version go1.21.3 darwin/arm64'

Current Stack: venelin-pulumi-corp/cloudflare_program/dev

Found no resources associated with dev

Found no pending operations associated with dev

Backend
Name           pulumi.com
URL            https://app.pulumi.com/venelin-pulumi-corp
User           venelin-pulumi-corp
Organizations  venelin-pulumi-corp, pulumi
Token type     personal

Dependencies:
NAME                             VERSION
github.com/pulumi/pulumi/sdk/v3  3.89.0

Pulumi locates its logs in /var/folders/82/nqnqw81s1h56l5nv940f9mq00000gn/T/ by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@VenelinMartinov VenelinMartinov added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 24, 2023
@mikhailshilkov mikhailshilkov added area/docs Improvements or additions to documentation and removed needs-triage Needs attention from the triage team labels Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Improvements or additions to documentation kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants