pritidesai commented on issue #743: Remove top-level deprecated Package schema.
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/743#issuecomment-366107389
 
 
   thanks Matt @mrutkows for clean up, we need to also remove `Package` from 
`YAML` struct here: 
https://github.com/mrutkows/incubator-openwhisk-wskdeploy/blob/5070701eba35155dbee4d914726c9ff750912d9c/parsers/yamlparser.go#L227
 
   
   After we remove `Package` from `YAML` struct, we need more changes to 
`deploymentreader.go` by removing:
   
   ```
   --- a/deployers/deploymentreader.go
   +++ b/deployers/deploymentreader.go
   @@ -78,8 +78,6 @@ func (reader *DeploymentReader) 
bindPackageInputsAndAnnotations() error {
                                   depPacks.Packagename = packName
                                   packMap[packName] = depPacks
                           }
   -               } else {
   -                       
packMap[reader.DeploymentDescriptor.Package.Packagename] = 
reader.DeploymentDescriptor.Package
                   }
           } else {
                   for packName, depPacks := range 
reader.DeploymentDescriptor.GetProject().Packages {
   
   ```
   
   `manifest_parser.go`:
   
   ```
   @@ -113,14 +112,10 @@ func (dm *YAMLParser) ParseManifest(manifestPath 
string) (*YAML, error) {
    func (dm *YAMLParser) ComposeDependenciesFromAllPackages(manifest *YAML, 
projectPath string, filePath string) (map[string]utils.DependencyRecord, error) 
{
           dependencies := make(map[string]utils.DependencyRecord)
           packages := make(map[string]Package)
   -       if manifest.Package.Packagename != "" {
   -               return dm.ComposeDependencies(manifest.Package, projectPath, 
filePath, manifest.Package.Packagename)
   +       if len(manifest.Packages) != 0 {
   +               packages = manifest.Packages
           } else {
   -               if len(manifest.Packages) != 0 {
   -                       packages = manifest.Packages
   -               } else {
   -                       packages = manifest.GetProject().Packages
   -               }
   +               packages = manifest.GetProject().Packages
           }
    
           for n, p := range packages {
   ```
   
   and much more ... :(
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to