mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-01 02:38:12 +00:00 
			
		
		
		
	bump(k8s.io/gengo): 257bac2d9657a64f7aa2d5c79beff88bb497df74
This commit is contained in:
		
							
								
								
									
										20
									
								
								Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										20
									
								
								Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							| @@ -2639,43 +2639,43 @@ | |||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/args", | 			"ImportPath": "k8s.io/gengo/args", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators", | 			"ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators", | 			"ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/examples/import-boss/generators", | 			"ImportPath": "k8s.io/gengo/examples/import-boss/generators", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/examples/set-gen/generators", | 			"ImportPath": "k8s.io/gengo/examples/set-gen/generators", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/examples/set-gen/sets", | 			"ImportPath": "k8s.io/gengo/examples/set-gen/sets", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/generator", | 			"ImportPath": "k8s.io/gengo/generator", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/namer", | 			"ImportPath": "k8s.io/gengo/namer", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/parser", | 			"ImportPath": "k8s.io/gengo/parser", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/gengo/types", | 			"ImportPath": "k8s.io/gengo/types", | ||||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			"ImportPath": "k8s.io/heapster/metrics/api/v1/types", | 			"ImportPath": "k8s.io/heapster/metrics/api/v1/types", | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -204,8 +204,8 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat | |||||||
| } | } | ||||||
|  |  | ||||||
| const ( | const ( | ||||||
| 	conversionPackagePath = "k8s.io/kubernetes/pkg/conversion" | 	conversionPackagePath = "k8s.io/apimachinery/pkg/conversion" | ||||||
| 	runtimePackagePath    = "k8s.io/kubernetes/pkg/runtime" | 	runtimePackagePath    = "k8s.io/apimachinery/pkg/runtime" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| // genDeepCopy produces a file with autogenerated deep-copy functions. | // genDeepCopy produces a file with autogenerated deep-copy functions. | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -428,8 +428,8 @@ func buildCallTreeForType(t *types.Type, root bool, existingDefaulters, newDefau | |||||||
| } | } | ||||||
|  |  | ||||||
| const ( | const ( | ||||||
| 	runtimePackagePath    = "k8s.io/kubernetes/pkg/runtime" | 	runtimePackagePath    = "k8s.io/apimachinery/pkg/runtime" | ||||||
| 	conversionPackagePath = "k8s.io/kubernetes/pkg/conversion" | 	conversionPackagePath = "k8s.io/apimachinery/pkg/conversion" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| // genDefaulter produces a file with a autogenerated conversions. | // genDefaulter produces a file with a autogenerated conversions. | ||||||
|   | |||||||
							
								
								
									
										38
									
								
								vendor/k8s.io/gengo/parser/parse.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										38
									
								
								vendor/k8s.io/gengo/parser/parse.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -136,14 +136,15 @@ func (b *Builder) importBuildPackage(dir string) (*build.Package, error) { | |||||||
| 	// Remember it under the user-provided name. | 	// Remember it under the user-provided name. | ||||||
| 	glog.V(5).Infof("saving buildPackage %s", dir) | 	glog.V(5).Infof("saving buildPackage %s", dir) | ||||||
| 	b.buildPackages[dir] = buildPkg | 	b.buildPackages[dir] = buildPkg | ||||||
| 	if dir != buildPkg.ImportPath { | 	canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) | ||||||
|  | 	if dir != string(canonicalPackage) { | ||||||
| 		// Since `dir` is not the canonical name, see if we knew it under another name. | 		// Since `dir` is not the canonical name, see if we knew it under another name. | ||||||
| 		if buildPkg, ok := b.buildPackages[buildPkg.ImportPath]; ok { | 		if buildPkg, ok := b.buildPackages[string(canonicalPackage)]; ok { | ||||||
| 			return buildPkg, nil | 			return buildPkg, nil | ||||||
| 		} | 		} | ||||||
| 		// Must be new, save it under the canonical name, too. | 		// Must be new, save it under the canonical name, too. | ||||||
| 		glog.V(5).Infof("saving buildPackage %s", buildPkg.ImportPath) | 		glog.V(5).Infof("saving buildPackage %s", canonicalPackage) | ||||||
| 		b.buildPackages[buildPkg.ImportPath] = buildPkg | 		b.buildPackages[string(canonicalPackage)] = buildPkg | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	return buildPkg, nil | 	return buildPkg, nil | ||||||
| @@ -223,7 +224,7 @@ func (b *Builder) AddDirRecursive(dir string) error { | |||||||
| 			rel := strings.TrimPrefix(path, prefix) | 			rel := strings.TrimPrefix(path, prefix) | ||||||
| 			if rel != "" { | 			if rel != "" { | ||||||
| 				// Make a pkg path. | 				// Make a pkg path. | ||||||
| 				pkg := filepath.Join(b.buildPackages[dir].ImportPath, rel) | 				pkg := filepath.Join(string(canonicalizeImportPath(b.buildPackages[dir].ImportPath)), rel) | ||||||
|  |  | ||||||
| 				// Add it. | 				// Add it. | ||||||
| 				if _, err := b.importPackage(pkg, true); err != nil { | 				if _, err := b.importPackage(pkg, true); err != nil { | ||||||
| @@ -250,7 +251,7 @@ func (b *Builder) AddDirTo(dir string, u *types.Universe) error { | |||||||
| 	if _, err := b.importPackage(dir, true); err != nil { | 	if _, err := b.importPackage(dir, true); err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| 	return b.findTypesIn(importPathString(b.buildPackages[dir].ImportPath), u) | 	return b.findTypesIn(canonicalizeImportPath(b.buildPackages[dir].ImportPath), u) | ||||||
| } | } | ||||||
|  |  | ||||||
| // The implementation of AddDir. A flag indicates whether this directory was | // The implementation of AddDir. A flag indicates whether this directory was | ||||||
| @@ -261,8 +262,9 @@ func (b *Builder) addDir(dir string, userRequested bool) error { | |||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| 	pkgPath := importPathString(buildPkg.ImportPath) | 	canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) | ||||||
| 	if dir != buildPkg.ImportPath { | 	pkgPath := canonicalPackage | ||||||
|  | 	if dir != string(canonicalPackage) { | ||||||
| 		glog.V(5).Infof("addDir %s, canonical path is %s", dir, pkgPath) | 		glog.V(5).Infof("addDir %s, canonical path is %s", dir, pkgPath) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @@ -300,8 +302,9 @@ func (b *Builder) importPackage(dir string, userRequested bool) (*tc.Package, er | |||||||
|  |  | ||||||
| 	// Get the canonical path if we can. | 	// Get the canonical path if we can. | ||||||
| 	if buildPkg := b.buildPackages[dir]; buildPkg != nil { | 	if buildPkg := b.buildPackages[dir]; buildPkg != nil { | ||||||
| 		glog.V(5).Infof("importPackage %s, canonical path is %s", dir, buildPkg.ImportPath) | 		canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) | ||||||
| 		pkgPath = importPathString(buildPkg.ImportPath) | 		glog.V(5).Infof("importPackage %s, canonical path is %s", dir, canonicalPackage) | ||||||
|  | 		pkgPath = canonicalPackage | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// If we have not seen this before, process it now. | 	// If we have not seen this before, process it now. | ||||||
| @@ -318,8 +321,9 @@ func (b *Builder) importPackage(dir string, userRequested bool) (*tc.Package, er | |||||||
|  |  | ||||||
| 		// Get the canonical path now that it has been added. | 		// Get the canonical path now that it has been added. | ||||||
| 		if buildPkg := b.buildPackages[dir]; buildPkg != nil { | 		if buildPkg := b.buildPackages[dir]; buildPkg != nil { | ||||||
| 			glog.V(5).Infof("importPackage %s, canonical path is %s", dir, buildPkg.ImportPath) | 			canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) | ||||||
| 			pkgPath = importPathString(buildPkg.ImportPath) | 			glog.V(5).Infof("importPackage %s, canonical path is %s", dir, canonicalPackage) | ||||||
|  | 			pkgPath = canonicalPackage | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @@ -749,3 +753,13 @@ func (b *Builder) addVariable(u types.Universe, useName *types.Name, in *tc.Var) | |||||||
| 	out.Underlying = b.walkType(u, nil, in.Type()) | 	out.Underlying = b.walkType(u, nil, in.Type()) | ||||||
| 	return out | 	return out | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // canonicalizeImportPath takes an import path and returns the actual package. | ||||||
|  | // It doesn't support nested vendoring. | ||||||
|  | func canonicalizeImportPath(importPath string) importPathString { | ||||||
|  | 	if !strings.Contains(importPath, "/vendor/") { | ||||||
|  | 		return importPathString(importPath) | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	return importPathString(importPath[strings.Index(importPath, "/vendor/")+len("/vendor/"):]) | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 deads2k
					deads2k