silverstripe / cow

Release tool for Silverstripe CMS
BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

Cow does not cleanup duplicate modules in a recipe with duplicates #81

Closed NightJar closed 6 years ago

NightJar commented 6 years ago

e.g.

  [silverstripe/auditor                      ]              └ silverstripe/auditor (2.1.2) new tag, prior version 2.1.1

I enter to alter this down to 2.1.1 and the result remains the same (the updated plan contains the above line verbatim still).

Notes towards what may cause this: This is a nested dependency, some strange amount of levels deep:

The below release plan has been generated for this project; Please confirm any manual changes below, or type a module name to edit the tag:
  [continue                                  ] continue
  [branching                                 ] modify branching strategy (auto)
  [cwp/cwp-recipe-kitchen-sink               ] cwp/cwp-recipe-kitchen-sink (2.0.0-rc2) new tag, prior version 2.0.0-rc1
  [cwp/cwp-installer                         ]  └ cwp/cwp-installer (2.0.0-rc2) new tag, prior version 2.0.0-rc1
  [cwp/cwp-recipe-core                       ]           └ cwp/cwp-recipe-core (2.0.0-rc2) new tag, prior version 2.0.0-rc1
  [silverstripe/recipe-core                  ]              └ silverstripe/recipe-core (1.1.0 existing tag)
  [cwp/cwp-core                              ]              └ cwp/cwp-core (2.0.0-rc2) new tag, prior version 2.0.0-rc1
  [silverstripe/auditor                      ]              └ silverstripe/auditor (2.1.2) new tag, prior version 2.1.1
  [silverstripe/environmentcheck             ]              └ silverstripe/environmentcheck (2.0.1) new tag, prior version 2.0.0
  [silverstripe/hybridsessions               ]              └ silverstripe/hybridsessions (2.0.1) new tag, prior version 2.0.0
  [silverstripe/mimevalidator                ]              └ silverstripe/mimevalidator (2.0.1) new tag, prior version 2.0.0
  [cwp/cwp-recipe-cms                        ]        └ cwp/cwp-recipe-cms (2.0.0-rc2) new tag, prior version 2.0.0-rc1
  [silverstripe/recipe-cms                   ]     └ silverstripe/recipe-cms (1.1.0 existing tag)
  [cwp/cwp                                   ]           └ cwp/cwp (2.0.0-rc2) new tag, prior version 2.0.0-rc1
  [cwp/cwp-pdfexport                         ]           └ cwp/cwp-pdfexport (1.0.1) new tag, prior version 1.0.0
  [silverstripe/html5                        ]           └ silverstripe/html5 (2.0.1) new tag, prior version 2.0.0
  [silverstripe/recipe-blog                  ]     └ silverstripe/recipe-blog (1.0.0-rc2) new tag, prior version 1.0.0-rc1
  [silverstripe/blog                         ]        └ silverstripe/blog (3.0.1) new tag, prior version 3.0.0

[...]

(output manually truncated in this paste).

tractorcow commented 6 years ago

This bug was caused by opening an old (broken) cow.pat.json in a new patched version of cow. It could not properly load the plan which had duplicate modules inside.

Renaming the bug to match.

tractorcow commented 6 years ago

@NightJar do you think that, now the bug is fixed, we'll ever run into this again? As long as we never open a plan created by the bugged version of cow we should be ok right? With this in mind are you happy for me to close this?

NightJar commented 6 years ago

I'm happy to have this closed, sure. Before I go off opening another issue though we can have a quick discussion in this context;

Do you think it might be valid to help avoid such issues occurring in the future (however likely or not) by adding the cow version to the pat file, so that a warning might be displayed if the current version of cow that loads the pat differs from that which generated the pat?

If yes, I'll open another issue to track that :)