<#18268 pants fails to compile crypto library `gol...
# github-notifications
q
#18268 pants fails to compile crypto library `golangcrypto/internal/nistec/p256_asm.go` due to missing embed configuration Issue created by jake-sigtech Describe the bug
pants package ::
fails to compile hello world code due to missing embed.
Copy code
20:08:14.34 [ERROR] 1 Exception encountered:

Engine traceback:
  in `package` goal

Exception: Failed to compile main:
/usr/local/go/src/crypto/internal/nistec/p256_asm.go:322:3: invalid go:embed: build system did not supply embed configuration
I have one golang file `handler.go`:
Copy code
package main

import (
	"bytes"
	"context"
	"encoding/json"

	"<http://github.com/aws/aws-lambda-go/events|github.com/aws/aws-lambda-go/events>"
	"<http://github.com/aws/aws-lambda-go/lambda|github.com/aws/aws-lambda-go/lambda>"
)

// Response is of type APIGatewayProxyResponse since we're leveraging the
// AWS Lambda Proxy Request functionality (default behavior)
//
// <https://serverless.com/framework/docs/providers/aws/events/apigateway/#lambda-proxy-integration>
type Response events.APIGatewayProxyResponse

// Handler is our lambda handler invoked by the `lambda.Start` function call
func Handler(ctx context.Context) (Response, error) {
	var buf bytes.Buffer

	body, err := json.Marshal(map[string]interface{}{
		"message": "Your function executed successfully!",
	})
	if err != nil {
		return Response{StatusCode: 404}, err
	}
	json.HTMLEscape(&buf, body)

	resp := Response{
		StatusCode:      200,
		IsBase64Encoded: false,
		Body:            buf.String(),
		Headers: map[string]string{
			"Content-Type":           "application/json",
			"X-MyCompany-Func-Reply": "hello-handler",
		},
	}

	return resp, nil
}

func main() {
	lambda.Start(Handler)
}
Pants version Latest main branch (
fe066387aa195ed149305fd7cebcd7ae2dbd458a
) OS MacOSX. Additional info Golang 1.20. pantsbuild/pants