You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ smi-sdk git:(main) ✗ ./hack/update-codegen.sh
>>> using codegen: /Users/<user>/go/pkg/mod/k8s.io/code-generator@v0.19.2
##### Generating split.smi-spec.io client ######
Generating clientset for split:v1alpha1 at github.com/<user>/smi-sdk/pkg/gen/client/split/clientset
2021/04/14 11:46:18 gopathwalk: scanning directory /Users/<user>/go/pkg/mod/github.com/googleapis/gnostic@v0.5.1: open /Users/<user>/go/pkg/mod/github.com/googleapis/gnostic@v0.5.1/plugins/gnostic-complexity: interrupted system call
2021/04/14 11:46:18 gopathwalk: scanning directory /Users/<user>/go/pkg/mod: open /Users/<user>/go/pkg/mod/github.com/!microsoft/go-winio@v0.4.15-0.20190919025122-fc70bd9a86b5/backuptar: interrupted system call
My script is:
#!/usr/bin/env bash
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o errexit
set -o nounset
set -o pipefail
ROOT_PACKAGE="github.com/michelleN/smi-sdk"
ROOT_DIR="$(git rev-parse --show-toplevel)"
# get code-generator version from go.sum
CODEGEN_VERSION="v0.19.2" # Must match k8s.io/client-go version defined in go.mod
CODEGEN_PKG="$(echo `go env GOPATH`/pkg/mod/k8s.io/code-generator@${CODEGEN_VERSION})"
echo ">>> using codegen: ${CODEGEN_PKG}"
# ensure we can execute the codegen script
chmod +x ${CODEGEN_PKG}/generate-groups.sh
function generate_client() {
CUSTOM_RESOURCE_NAME=$1
CUSTOM_RESOURCE_VERSIONS=$2
# code-generator makes assumptions about the project being located in `$GOPATH/src`.
"${CODEGEN_PKG}"/generate-groups.sh all \
"$ROOT_PACKAGE/generated/$CUSTOM_RESOURCE_NAME" \
"$ROOT_PACKAGE/apis" \
$CUSTOM_RESOURCE_NAME:$CUSTOM_RESOURCE_VERSIONS \
--go-header-file "${ROOT_DIR}"/hack/boilerplate.go.txt \
--output-base ../../../ -v 10
}
echo "##### Generating split.smi-spec.io client ######"
generate_client "split" "v1alpha1"
My directory structure looks like this:
This is what gets generated:
generated/split/clientset/versioned/typed/split/v1alpha1/split_client.go and generated/split/clientset/versioned/typed/split/v1alpha1/generated_expansion.go are both empty.
While clientset.go looks like this
➜ smi-sdk git:(main) ✗ cat generated/split/clientset/versioned/clientset.go
/*
Copyright 2021.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package versioned
import (
"fmt"
splitv1alpha1 "github.com/michelleN/smi-sdk/generated/split/clientset/versioned/typed/split/v1alpha1"
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
)
type Interface interface {
Discovery() discovery.DiscoveryInterface
SplitV1alpha1() splitv1alpha1.SplitV1alpha1Interface
}
// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
splitV1alpha1 *splitv1alpha1.SplitV1alpha1Client
}
[...]
References to the interfaces show this error:
SplitV1alpha1Interface not declared by package v1alpha1 compilerUndeclaredImportedName
The text was updated successfully, but these errors were encountered:
My script is:
My directory structure looks like this:

This is what gets generated:

generated/split/clientset/versioned/typed/split/v1alpha1/split_client.go
andgenerated/split/clientset/versioned/typed/split/v1alpha1/generated_expansion.go
are both empty.While
clientset.go
looks like thisReferences to the interfaces show this error:
The text was updated successfully, but these errors were encountered: