mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 02:08:13 +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", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/gengo/examples/import-boss/generators", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/gengo/examples/set-gen/generators", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/gengo/examples/set-gen/sets", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/gengo/generator", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/gengo/namer", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/gengo/parser", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"ImportPath": "k8s.io/gengo/types", | ||||
| 			"Rev": "8dd9c9e5e82c3cca687497c3cd7ac90e702c7c21" | ||||
| 			"Rev": "257bac2d9657a64f7aa2d5c79beff88bb497df74" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"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 ( | ||||
| 	conversionPackagePath = "k8s.io/kubernetes/pkg/conversion" | ||||
| 	runtimePackagePath    = "k8s.io/kubernetes/pkg/runtime" | ||||
| 	conversionPackagePath = "k8s.io/apimachinery/pkg/conversion" | ||||
| 	runtimePackagePath    = "k8s.io/apimachinery/pkg/runtime" | ||||
| ) | ||||
|  | ||||
| // 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 ( | ||||
| 	runtimePackagePath    = "k8s.io/kubernetes/pkg/runtime" | ||||
| 	conversionPackagePath = "k8s.io/kubernetes/pkg/conversion" | ||||
| 	runtimePackagePath    = "k8s.io/apimachinery/pkg/runtime" | ||||
| 	conversionPackagePath = "k8s.io/apimachinery/pkg/conversion" | ||||
| ) | ||||
|  | ||||
| // 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. | ||||
| 	glog.V(5).Infof("saving buildPackage %s", dir) | ||||
| 	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. | ||||
| 		if buildPkg, ok := b.buildPackages[buildPkg.ImportPath]; ok { | ||||
| 		if buildPkg, ok := b.buildPackages[string(canonicalPackage)]; ok { | ||||
| 			return buildPkg, nil | ||||
| 		} | ||||
| 		// Must be new, save it under the canonical name, too. | ||||
| 		glog.V(5).Infof("saving buildPackage %s", buildPkg.ImportPath) | ||||
| 		b.buildPackages[buildPkg.ImportPath] = buildPkg | ||||
| 		glog.V(5).Infof("saving buildPackage %s", canonicalPackage) | ||||
| 		b.buildPackages[string(canonicalPackage)] = buildPkg | ||||
| 	} | ||||
|  | ||||
| 	return buildPkg, nil | ||||
| @@ -223,7 +224,7 @@ func (b *Builder) AddDirRecursive(dir string) error { | ||||
| 			rel := strings.TrimPrefix(path, prefix) | ||||
| 			if rel != "" { | ||||
| 				// Make a pkg path. | ||||
| 				pkg := filepath.Join(b.buildPackages[dir].ImportPath, rel) | ||||
| 				pkg := filepath.Join(string(canonicalizeImportPath(b.buildPackages[dir].ImportPath)), rel) | ||||
|  | ||||
| 				// Add it. | ||||
| 				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 { | ||||
| 		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 | ||||
| @@ -261,8 +262,9 @@ func (b *Builder) addDir(dir string, userRequested bool) error { | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	pkgPath := importPathString(buildPkg.ImportPath) | ||||
| 	if dir != buildPkg.ImportPath { | ||||
| 	canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) | ||||
| 	pkgPath := canonicalPackage | ||||
| 	if dir != string(canonicalPackage) { | ||||
| 		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. | ||||
| 	if buildPkg := b.buildPackages[dir]; buildPkg != nil { | ||||
| 		glog.V(5).Infof("importPackage %s, canonical path is %s", dir, buildPkg.ImportPath) | ||||
| 		pkgPath = importPathString(buildPkg.ImportPath) | ||||
| 		canonicalPackage := canonicalizeImportPath(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. | ||||
| @@ -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. | ||||
| 		if buildPkg := b.buildPackages[dir]; buildPkg != nil { | ||||
| 			glog.V(5).Infof("importPackage %s, canonical path is %s", dir, buildPkg.ImportPath) | ||||
| 			pkgPath = importPathString(buildPkg.ImportPath) | ||||
| 			canonicalPackage := canonicalizeImportPath(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()) | ||||
| 	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