Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perlPackages.AppSqitch: 1.4.0 -> 1.4.1 #351171

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

akegalj
Copy link

@akegalj akegalj commented Oct 25, 2024

Bump sqitch tool from v1.4.0 to v1.4.1

This realease https://github.com/sqitchers/sqitch/releases/tag/v1.4.1 mostly contains bug fixes. Most notably:

Updated the locale configuration to fix issues in more recent versions of Perl, and added tests to ensure that the sqitch CLI executes and properly emits localized messages (except on Windows, where the language codes are incompatible).

which is related to sqitch v1.4.0 failing on some machines due too bug in setting a locale. This was fixed here sqitchers/sqitch#806 (comment) and pushed to v1.4.1.

Other comments from release notes don't look like a breaking change. I have checked note:

Tests now require Test::Warn 0.31 or later, as newline handling issues cause test failures in earlier versions. Thanks to Slaven Rezić for the test reports and for identifying the issue.

And this doesn't seem like a breaking change as TestWarn is at version 0.37 https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix#L26217

Note: This package doesn't have tests so no automated tests are run

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@zakame
Copy link
Member

zakame commented Oct 25, 2024

@ofborg build perl540Packages.AppSqitch

@zakame
Copy link
Member

zakame commented Oct 25, 2024

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 351171


x86_64-linux

✅ 6 packages built:
  • perl538Packages.AppSqitch
  • perl538Packages.AppSqitch.devdoc
  • perl540Packages.AppSqitch
  • perl540Packages.AppSqitch.devdoc
  • sqitchMysql
  • sqitchPg

url = "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v1.4.0.tar.gz";
hash = "sha256-sNs4cDH3dWJmLgA7xV16EComOAtK1/25qKO61XaeUBw=";
url = "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v1.4.1.tar.gz";
hash = "sha256-yvMcyPdy46TJ1LP/Oo9oSm61sbPCYfTdwPkKiMNgB8Y=";
};
buildInputs = [ CaptureTiny TestDeep TestDir TestException TestFile TestFileContents TestMockModule TestMockObject TestNoWarnings TestWarn ];
propagatedBuildInputs = [ Clone ConfigGitLike DBI DateTime EncodeLocale HashMerge IOPager IPCRun3 IPCSystemSimple ListMoreUtils PathClass PerlIOutf8_strict PodParser StringFormatter StringShellQuote TemplateTiny Throwable TypeTiny URIdb libintl-perl ];
Copy link
Member

Choose a reason for hiding this comment

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

Apparently it also needs a dep on AlgorithmBackoff:

Running phase: buildPhase
Checking prerequisites...
  requires:
    !  Algorithm::Backoff::Exponential is not installed

(There's also atest_requires on Test-Exit, but doesn't seem to break anything in this case.)

Copy link
Member

Choose a reason for hiding this comment

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

I think we should enable tests here to pick up on these kinds of errors, this patch sorts that:

diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 37a5261383f3..a007e54fab50 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -998,9 +998,8 @@ with self; {
       url = "mirror://cpan/authors/id/D/DW/DWHEELER/App-Sqitch-v1.4.1.tar.gz";
       hash = "sha256-yvMcyPdy46TJ1LP/Oo9oSm61sbPCYfTdwPkKiMNgB8Y=";
     };
-    buildInputs = [ CaptureTiny TestDeep TestDir TestException TestFile TestFileContents TestMockModule TestMockObject TestNoWarnings TestWarn ];
-    propagatedBuildInputs = [ Clone ConfigGitLike DBI DateTime EncodeLocale HashMerge IOPager IPCRun3 IPCSystemSimple ListMoreUtils PathClass PerlIOutf8_strict PodParser StringFormatter StringShellQuote TemplateTiny Throwable TypeTiny URIdb libintl-perl ];
-    doCheck = false;  # Can't find home directory.
+    buildInputs = [ CaptureTiny TestExit TestDeep TestDir TestException TestFile TestFileContents TestMockModule TestMockObject TestNoWarnings TestWarn ];
+    propagatedBuildInputs = [ Clone ConfigGitLike DBI DateTime EncodeLocale HashMerge IOPager IPCRun3 IPCSystemSimple ListMoreUtils PathClass PerlIOutf8_strict PodParser StringFormatter StringShellQuote TemplateTiny Throwable TypeTiny URIdb libintl-perl AlgorithmBackoff ];
     meta = {
       description = "Sensible database change management";
       homepage = "https://sqitch.org";
@@ -22105,6 +22104,21 @@ with self; {
     };
   };

+  ReturnMultiLevel = buildPerlPackage {
+    pname = "Return-MultiLevel";
+    version = "0.08";
+    src = fetchurl {
+      url = "mirror://cpan/authors/id/P/PL/PLICEASE/Return-MultiLevel-0.08.tar.gz";
+      hash = "sha256-UbGu8wxcQAn2QCZ6CFiSEuh9zRAYAPDSD5xjXJ/+iKE=";
+    };
+    buildInputs = [ TestFatal ];
+    meta = {
+      homepage = "https://metacpan.org/pod/Return::MultiLevel";
+      description = "Return across multiple call levels";
+      license = with lib.licenses; [ artistic1 gpl1Plus ];
+    };
+  };
+
   ReturnValue = buildPerlPackage {
     pname = "Return-Value";
     version = "1.666005";
@@ -25039,6 +25053,20 @@ with self; {
     };
   };

+  TestExit = buildPerlPackage {
+    pname = "Test-Exit";
+    version = "0.11";
+    src = fetchurl {
+      url = "mirror://cpan/authors/id/A/AR/ARODLAND/Test-Exit-0.11.tar.gz";
+      hash = "sha256-+9qS034EgdGO68geSNAlIotXGExZstWm9r34cELox7I=";
+    };
+    propagatedBuildInputs = [ ReturnMultiLevel ];
+    meta = {
+      description = "Test whether code exits without terminating testing";
+      license = with lib.licenses; [ artistic1 gpl1Plus ];
+    };
+  };
+
   TestExpect = buildPerlPackage {
     pname = "Test-Expect";
     version = "0.34";

Copy link
Author

@akegalj akegalj Oct 26, 2024

Choose a reason for hiding this comment

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

Apparently it also needs a dep on AlgorithmBackoff:

Running phase: buildPhase
Checking prerequisites...
  requires:
    !  Algorithm::Backoff::Exponential is not installed

(There's also atest_requires on Test-Exit, but doesn't seem to break anything in this case.)

How did you get that info? From CI log? (trying to understand for future PRs)

EDIT: aha, its in logs/perl538Packages.AppSqitch*

Copy link
Author

Choose a reason for hiding this comment

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

@stigtsp I have pushed your patch to this PR

Copy link
Author

Choose a reason for hiding this comment

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

@zakame

nixpkgs-review pr 351171

thanks for the command. I was using nixpkgs-review rev HEAD which seems to do something different (so I aborted that command when I tried it yesterday).

Copy link
Author

Choose a reason for hiding this comment

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

With that patch "required" prerequisites are gone. There are now "recommends":

patching ./t/firebird.t...
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
Checking prerequisites...
  recommends:
    *  Class::XSAccessor is not installed
    *  Template is not installed
    *  Type::Tiny::XS is not installed

but my assumption is that these don't have to be added. Not sure what that even means, dependency to be recommended :|

Copy link
Member

Choose a reason for hiding this comment

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

Yep that should be fine - we can leave that to the consumers of the package to add recommended deps via overlays.

Comment on lines +22107 to +22121
ReturnMultiLevel = buildPerlPackage {
pname = "Return-MultiLevel";
version = "0.08";
src = fetchurl {
url = "mirror://cpan/authors/id/P/PL/PLICEASE/Return-MultiLevel-0.08.tar.gz";
hash = "sha256-UbGu8wxcQAn2QCZ6CFiSEuh9zRAYAPDSD5xjXJ/+iKE=";
};
buildInputs = [ TestFatal ];
meta = {
homepage = "https://metacpan.org/pod/Return::MultiLevel";
description = "Return across multiple call levels";
license = with lib.licenses; [ artistic1 gpl1Plus ];
};
};

Copy link
Member

@zakame zakame Oct 26, 2024

Choose a reason for hiding this comment

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

Please commit separately under perlPackages.ReturnMultiLevel: init at 0.08

Comment on lines +25056 to +25069
TestExit = buildPerlPackage {
pname = "Test-Exit";
version = "0.11";
src = fetchurl {
url = "mirror://cpan/authors/id/A/AR/ARODLAND/Test-Exit-0.11.tar.gz";
hash = "sha256-+9qS034EgdGO68geSNAlIotXGExZstWm9r34cELox7I=";
};
propagatedBuildInputs = [ ReturnMultiLevel ];
meta = {
description = "Test whether code exits without terminating testing";
license = with lib.licenses; [ artistic1 gpl1Plus ];
};
};

Copy link
Member

Choose a reason for hiding this comment

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

Also commit this separately as perlPackages.TestExit: init at 0.11

Copy link
Author

Choose a reason for hiding this comment

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

I have rearanged the commits in git so they appear in a correct order based on dependencies:

[akegalj@x220:~/projects/nixpkgs]$ git log --pretty=format:%s HEAD^~2..HEAD
perlPackages.AppSqitch: 1.4.0 -> 1.4.1
perlPackages.TestExit: init at 0.11
perlPackages.ReturnMultiLevel: init at 0.08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants