Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

Parameter composition leads to duplication in metadata.json #102

Closed
ddgenome opened this issue Feb 10, 2017 · 5 comments
Closed

Parameter composition leads to duplication in metadata.json #102

ddgenome opened this issue Feb 10, 2017 · 5 comments
Labels
Milestone

Comments

@ddgenome
Copy link
Contributor

The rug-editors-0.8.0-metadata.json file contains a duplication of the parameter from an editor it calls:

{
    "name" : "AddTypeScriptEditor",
    "description" : "uses a template to create samplefile.txt",
    "parameters" : [ {
      "name" : "editor_name",
      "description" : "name of your new editor",
      "pattern" : "^[A-Z][A-Za-z0-9]*$",
      "required" : true,
      "displayable" : true,
      "valid_input_description" : "a valid Rug Editor name starting with a capital letter and containing only alphanumeric characters from one to 100 characters long",
      "max_length" : 100,
      "min_length" : 1,
      "display_name" : "Editor Name"
    }, {
      "name" : "rug_version",
      "description" : "specific version or version range for Rug",
      "pattern" : "^(?:(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)|[\\[\\(](?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*),(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)[\\]\\)])$",
      "required" : false,
      "displayable" : true,
      "default_value" : "0.11.0",
      "valid_input_description" : "a valid Node.js version range, e.g., '0.11.0' or '>= 0.11.0', see https://docs.npmjs.com/misc/semver",
      "max_length" : -1,
      "min_length" : -1,
      "display_name" : "Rug Version"
    }, {
      "name" : "rug_version",
      "description" : "specific version or version range for Rug",
      "pattern" : "^(?:(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)|[\\[\\(](?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*),(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)[\\]\\)])$",
      "required" : false,
      "displayable" : true,
      "default_value" : "0.11.0",
      "valid_input_description" : "a valid Node.js version range, e.g., '0.11.0' or '>= 0.11.0', see https://docs.npmjs.com/misc/semver",
      "max_length" : -1,
      "min_length" : -1,
      "display_name" : "Rug Version"
    } ],
    "tags" : [ {
      "name" : "rug",
      "decription" : "rug"
    } ]
  }

The rug_version parameter is not defined by AddTypeScriptEditor, but rather by the editor AddTypescript, which AddTypeScriptEditor calls, although AddTypeScript only defines it once.

The problem is presumably in the packaging step and likely relates to the recent change that no longer requires developers to duplicate parameters in composed editors.

This causes the search catalog and Rug CLI to erroneously report the list of parameters for the editor.

@ddgenome ddgenome added the bug label Feb 10, 2017
@cdupuis
Copy link
Contributor

cdupuis commented Feb 10, 2017

It is unlikely (yet not impossible) that this is a bug in the CLI. See atomist-attic/rug#258

Can you please verify that this still happening with latest Rug?

@cdupuis cdupuis added question and removed bug labels Feb 10, 2017
@cdupuis cdupuis self-assigned this Feb 10, 2017
@cdupuis
Copy link
Contributor

cdupuis commented Feb 13, 2017

@ddgenome did you get a chance to test this?

@ddgenome
Copy link
Contributor Author

Not yet

@ddgenome
Copy link
Contributor Author

Looks good in the rug-0.12.0 branch against the rug-0.12.0-SNAPSHOT. Thanks and sorry for the trouble.

@cdupuis
Copy link
Contributor

cdupuis commented Feb 13, 2017

Thanks @ddgenome

@cdupuis cdupuis added this to the 0.24.0 milestone Feb 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants