From f283c2662806d0b0fe4446dd2f519cb57465d73a Mon Sep 17 00:00:00 2001 From: piegames Date: Sat, 23 Sep 2023 10:01:18 +0200 Subject: [PATCH 1/6] Document release process --- MAINTENANCE.md | 14 ++++++++++++++ README.md | 5 ----- 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 MAINTENANCE.md diff --git a/MAINTENANCE.md b/MAINTENANCE.md new file mode 100644 index 00000000..a50a8a35 --- /dev/null +++ b/MAINTENANCE.md @@ -0,0 +1,14 @@ + + +# Maintainer documentation + +## Making a new release + +- Check the commit log if anything is missing from the change log. +- Check dependency versions in `nixfmt.cabal`, bump upper bounds if possible. +- Bump the version. +- Give it a git tag. +- Upload to hackage using `cabal sdist`. See https://hackage.haskell.org/upload for details. diff --git a/README.md b/README.md index 3fa20fe5..f17c0c7e 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,6 @@ Haskell dependencies will be built by Cabal. * `nixfmt file.nix` – format the file in place -## For Contributors - -We welcome issues and pull requests on GitHub. - - ## About Serokell `nixfmt` is maintained and funded with :heart: by From 981b1d768c444310bf626e5ae7ff24a25fcefb5d Mon Sep 17 00:00:00 2001 From: piegames Date: Sat, 23 Sep 2023 11:37:25 +0200 Subject: [PATCH 2/6] Relax dependency version bounds Closes #130 --- nixfmt.cabal | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nixfmt.cabal b/nixfmt.cabal index 704461c9..6f4b9356 100644 --- a/nixfmt.cabal +++ b/nixfmt.cabal @@ -41,11 +41,11 @@ executable nixfmt else buildable: True build-depends: - base >= 4.12.0 && < 4.17 + base >= 4.12.0 && < 4.19 , cmdargs >= 0.10.20 && < 0.11 , nixfmt - , unix >= 2.7.2 && < 2.8 - , text >= 1.2.3 && < 1.3 + , unix >= 2.7.2 && < 2.9 + , text >= 1.2.3 && < 2.2 -- for System.IO.Atomic , directory >= 1.3.3 && < 1.4 @@ -86,11 +86,11 @@ library hs-source-dirs: src build-depends: - base >= 4.12.0 && < 4.17 - , megaparsec >= 9.0.1 && < 9.3 + base >= 4.12.0 && < 4.19 + , megaparsec >= 9.0.1 && < 9.6 , parser-combinators >= 1.0.3 && < 1.4 , scientific >= 0.3.0 && < 0.4.0 - , text >= 1.2.3 && < 1.3 + , text >= 1.2.3 && < 2.2 default-language: Haskell2010 ghc-options: -Wall @@ -113,7 +113,7 @@ executable js-interface -Wredundant-constraints -Wno-orphans build-depends: - base >= 4.12.0 && < 4.17 + base >= 4.12.0 && < 4.19 , ghcjs-base >= 0.2.0 && < 0.3 , nixfmt hs-source-dirs: js/ From 79495e6b2c31be7989709205e59d64ecde2212a1 Mon Sep 17 00:00:00 2001 From: piegames Date: Mon, 2 Oct 2023 12:04:46 +0200 Subject: [PATCH 3/6] Update Nix dependencies --- flake.lock | 44 +++++++++++++++++++++++++++++++------------- flake.nix | 2 +- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index 9215bbd2..9b948906 100644 --- a/flake.lock +++ b/flake.lock @@ -182,11 +182,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "owner": "edolstra", "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "type": "github" }, "original": { @@ -260,12 +260,15 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "type": "github" }, "original": { @@ -740,11 +743,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1667292599, - "narHash": "sha256-7ISOUI1aj6UKMPIL+wwthENL22L3+A9V+jS8Is3QsRo=", + "lastModified": 1696165369, + "narHash": "sha256-pd1cjFHCoEf9q5f9B0HhlOwwpBI9RP3HbUE6xjI7wAI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ef2f213d9659a274985778bff4ca322f3ef3ac68", + "rev": "d7186d62bb68fac3c90f1d95515e613ef299e992", "type": "github" }, "original": { @@ -852,16 +855,16 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1672580127, - "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", + "lastModified": 1696039360, + "narHash": "sha256-g7nIUV4uq1TOVeVIDEZLb005suTWCUjSY0zYOlSBsyE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0874168639713f547c05947c76124f78441ea46c", + "rev": "32dcb45f66c0487e92db8303a798ebc548cadedc", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.05", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } @@ -1186,6 +1189,21 @@ "repo": "yants", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 2f7352ac..8e4dca6b 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-22.05"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05"; flake-utils.url = "github:numtide/flake-utils"; From f6e7e80105d9689e022f6ca1687401f2cc1c4721 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 31 Oct 2023 22:07:12 +0100 Subject: [PATCH 4/6] Fix TypeOperators warning --- src/Nixfmt/Parser/Float.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nixfmt/Parser/Float.hs b/src/Nixfmt/Parser/Float.hs index c5360b55..660ac839 100644 --- a/src/Nixfmt/Parser/Float.hs +++ b/src/Nixfmt/Parser/Float.hs @@ -4,7 +4,7 @@ - SPDX-License-Identifier: MPL-2.0 -} -{-# LANGUAGE TypeFamilies, TypeApplications, ScopedTypeVariables #-} +{-# LANGUAGE TypeFamilies, TypeApplications, ScopedTypeVariables, TypeOperators #-} module Nixfmt.Parser.Float (floatParse) where From 6d0f1438efff048843ff493ec1d42988ba42f49e Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 31 Oct 2023 22:13:04 +0100 Subject: [PATCH 5/6] Export missing symbols --- src/Nixfmt.hs | 1 + src/Nixfmt/Predoc.hs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Nixfmt.hs b/src/Nixfmt.hs index ff0fcff1..a8af7c4d 100644 --- a/src/Nixfmt.hs +++ b/src/Nixfmt.hs @@ -7,6 +7,7 @@ module Nixfmt ( errorBundlePretty , ParseErrorBundle + , Width , format , formatVerify ) where diff --git a/src/Nixfmt/Predoc.hs b/src/Nixfmt/Predoc.hs index 4e1b41c6..d128ffee 100644 --- a/src/Nixfmt/Predoc.hs +++ b/src/Nixfmt/Predoc.hs @@ -24,6 +24,7 @@ module Nixfmt.Predoc , hardline , emptyline , newline + , DocE , Doc , Pretty , pretty From 8b6ccc6b423fcee7cedc766f173c685498926290 Mon Sep 17 00:00:00 2001 From: piegames Date: Wed, 6 Sep 2023 23:10:17 +0200 Subject: [PATCH 6/6] Bump version to 0.6.0 --- CHANGELOG.md | 2 ++ nixfmt.cabal | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a04cd703..162b3a8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ ## Unreleased +## 0.6.0 -- 2023-10-31 + * Fix escaping of interpolations after dollar signs. * Fix nixfmt trying to allocate temp files that aren't used. * Don't write if files didn't change, fixing treefmt compatibility diff --git a/nixfmt.cabal b/nixfmt.cabal index 6f4b9356..832b28e3 100644 --- a/nixfmt.cabal +++ b/nixfmt.cabal @@ -6,7 +6,7 @@ cabal-version: 2.0 -- SPDX-License-Identifier: MPL-2.0 name: nixfmt -version: 0.5.0 +version: 0.6.0 synopsis: An opinionated formatter for Nix description: A formatter for Nix that ensures consistent and clear formatting by forgetting