Closed ulucinar closed 2 years ago
Referencer configuration involving a function call expression with an argument with dots fails with the following message:
angryjet: error: cannot write reference resolvers for package github.com/upbound/official-providers/provider-azure/apis/cache/v1beta1: cannot write reference resolver methods: cannot render Go file: Error 15:41: invalid import path: "github.com/upbound/upjet/pkg/resource.ExtractParamPath(\"spec.forProvider" (and 10 more errors) while formatting source: ...
Configure a referencer as follows:
// +crossplane:generate:reference:type=github.com/upbound/official-providers/provider-azure/apis/cache/v1beta1.RedisCache // +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("spec.forProvider.alias") // +kubebuilder:validation:Optional ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"`
, and run:
go run -tags generate github.com/crossplane/crossplane-tools/cmd/angryjet generate-methodsets --header-file=../hack/boilerplate.go.txt ./...
crossplane-tools commit: 1f43fc12793e
1f43fc12793e
What happened?
Referencer configuration involving a function call expression with an argument with dots fails with the following message:
How can we reproduce it?
Configure a referencer as follows:
, and run:
What environment did it happen in?
crossplane-tools commit:
1f43fc12793e