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

elm_deps_sync: avoid unwanted diffs #16

Merged
merged 4 commits into from
Nov 8, 2016
Merged

elm_deps_sync: avoid unwanted diffs #16

merged 4 commits into from
Nov 8, 2016

Conversation

ento
Copy link
Contributor

@ento ento commented Nov 4, 2016

Using elm_deps_sync should make minimum changes possible. Either

  1. As a direct result of running elm_deps_sync
  2. As a result of running elm-package install afterwards inside the spec folder

In order to do so, there are two pieces to take care of:

  1. Order of top-level properties of the spec package (version, summary, description, ...): should be what's defined by elm-package.
  • This is achieved by preserving the order of the keys when reading the spec file, then writing them back as-is.
  • "test-dependencies" is appended as the last property.
  1. Order of dependencies: should be what's defined by elm-package (sorted alphabetically)
  • This is achieved by sorting dependencies alphabetically when writing back changes.

Other stuff, like matching the JSON format (indentation, etc) with what elm-package outputs, are already taken care of as far as I can see.

- "3.5" # >= xenial
- "3.6-dev"
- "nightly"
# command to install dependencies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ thanks

@eeue56
Copy link
Contributor

eeue56 commented Nov 4, 2016

this is a great. please merge and bump the version then bump the version in asset_dependencies

@ento
Copy link
Contributor Author

ento commented Nov 8, 2016

Thanks for reviewing!

@ento ento merged commit 35c160e into master Nov 8, 2016
@ento ento deleted the no-surprising-diffs branch November 8, 2016 01:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants