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

Rug should only supply one project_name implicit parameter #258

Closed
russmiles opened this issue Feb 1, 2017 · 6 comments
Closed

Rug should only supply one project_name implicit parameter #258

russmiles opened this issue Feb 1, 2017 · 6 comments
Labels
Milestone

Comments

@russmiles
Copy link
Contributor

If you have project_name parameter in your Rug generator then you end up with two as the implicit one does not override the existing one. You can see this when you describe the generator using rug-cli:

→ Parameters (required)
  project_name (Project Name)
    Name of your new project
      pattern: ^[-\w.]+$, min length: 1, max length: 21
  project_name (Project Name)
    Name of your new project
      pattern: ^[-\w.]+$, min length: 1, max length: 21
@russmiles russmiles added the bug label Feb 1, 2017
@russmiles russmiles added this to the 0.11.0 milestone Feb 1, 2017
@kipz kipz closed this as completed Feb 2, 2017
@kipz kipz reopened this Feb 2, 2017
@kipz kipz removed this from the 0.11.0 milestone Feb 2, 2017
@kipz kipz added the DSL label Feb 9, 2017
@kipz kipz added this to the 0.12.0 milestone Feb 9, 2017
@kipz kipz self-assigned this Feb 9, 2017
@kipz
Copy link
Contributor

kipz commented Feb 9, 2017

I believe this is fixed in: atomist-attic/rug-cli#85

I verified this with: https://github.com/atomist-rugs/spring-boot-rest-service

rug -l describe generator NewSpringBootRestService

And I have a passing test in Rug that proves only one parameter is returned in the parameters list.

@kipz kipz closed this as completed Feb 9, 2017
@kipz kipz added the duplicate label Feb 9, 2017
@cdupuis cdupuis reopened this Feb 9, 2017
@cdupuis
Copy link
Contributor

cdupuis commented Feb 9, 2017

No, this is not fixed. This has to be fixed inside Rug.

From the generator, remove the project_name parameter and you'll get suddenly two of those.

@cdupuis cdupuis removed the duplicate label Feb 9, 2017
@kipz
Copy link
Contributor

kipz commented Feb 9, 2017

Can you provide more information then please?

My test case does not return duplicate parameters when we query the ProjectOperation.

@kipz
Copy link
Contributor

kipz commented Feb 9, 2017

Note from @cdupuis - the bug report is wrong. This is not related to having declare the project_name in the generator, but from:

a generator without project_name which uses some editors with project_name

@kipz
Copy link
Contributor

kipz commented Feb 9, 2017

More precisely, I'm able to recreate the issue if you:

  • Describe a generator that uses more than one editor that both declare the same parameters.

I suppose we should select the parameter from the first uses as the parameter to expose?

kipz added a commit that referenced this issue Feb 9, 2017
Don't duplicate implicit parameters in calling editor/generator #258
@kipz
Copy link
Contributor

kipz commented Feb 9, 2017

Thanks for the info @cdupuis @russmiles. Fixed in next release.

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

3 participants