I like using mfgames-conventional-commit to handle semantic releases. However, a recent change to one of the supporting crates of that program caused a problem with building in pipelines, so I decided to make a breaking change to the flake, but also used that as an opportunity to add a few things.
The biggest one is mfgames-conventional-commits is not enabled by default.
This means that it needs to be enabled as part of the flake:
{
description = "Description for the project";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-flake.url = "github:juspay/rust-flake";
mfgames-project-setup.url = "git+https://src.mfgames.com/nixos-contrib/mfgames-project-setup-flake.git?ref=refs/tags/v1.4.2";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } (
{ withSystem, flake-parts-lib, ... }:
{
imports = [
inputs.mfgames-project-setup.flakeModules.default
];
# Configure mfgames project settings.
mfgames.project = {
enable = true;
mfgames-conventional-commit.enable = true;
};
})
}
That should also speed up builds where the commits aren't required.
C# Changes
It looks like the change to Microsoft's C# guidelines are part of this release.
This uses the .editorconfig settings from
Microsoft's Runtime team.
We were originally using the StyleCop from another Microsoft team, but this
appears to be the “winner” for more consistent formatting.
It will take me a while to get used to _variable instead of this.variable,
but I think it will be good in the long run.
Additional Changes
Since I was editing the file, I added a few things that were on my issue list:
- Updated the base packages to 26.05
nixpkgs. - Added formatting of just files with
just.formatand thetreefmtsettions. This defaults to enable. - Added
treefmt.enable(defaulttrue) to disabletreefmt - Added
just.format(defaulttrue) to format Just files. If enabled,treefmtwill handle that. - Added
treefmt.extraFormattersto provide custom formatting rules because it was annoying to add the shell formatter before I integrated it. - Added
javascript.enableto addpackage.jsonandpackage-lock.jsonto theprettierignore list. - Moved some JavaScript and TypeScript file extensions to be controlled by the
respective
formatoption (defaults to theenableflag).
I also found nixdoc after writing my own implementation of documentation. So I changed it to use that because I'm all for using other people's code to do something so I don't have to maintain it.