Skip to content

openapi-generator-cli: 7.18.0 -> 7.21.0#483728

Merged
pbsds merged 1 commit intoNixOS:masterfrom
booxter:openapi-bump
Apr 6, 2026
Merged

openapi-generator-cli: 7.18.0 -> 7.21.0#483728
pbsds merged 1 commit intoNixOS:masterfrom
booxter:openapi-bump

Conversation

@booxter
Copy link
Copy Markdown
Contributor

@booxter booxter commented Jan 25, 2026

Fixes #505996

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci bot requested a review from Shou January 25, 2026 19:09
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Jan 25, 2026
@booxter
Copy link
Copy Markdown
Contributor Author

booxter commented Jan 25, 2026

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 483728 --additional-package openapi-generator-cli.passthru.tests
Commit: 552ce7a238689b584296e28beb4d7e386b13d2fc


x86_64-linux

✅ 3 packages built:
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example
  • warpgate

aarch64-linux

✅ 3 packages built:
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example
  • warpgate

aarch64-darwin

✅ 3 packages built:
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example
  • warpgate

@nixpkgs-ci nixpkgs-ci bot added the 8.has: package (update) This PR updates a package to a newer version label Jan 26, 2026
Comment thread pkgs/by-name/op/openapi-generator-cli/package.nix Outdated
@booxter
Copy link
Copy Markdown
Contributor Author

booxter commented Feb 7, 2026

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 483728 --additional-package openapi-generator-cli.passthru.tests
Commit: da6afadcb0e6e835b0788e09250d7a1a8e19da6e


x86_64-linux

✅ 3 packages built:
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example
  • warpgate

aarch64-linux

✅ 3 packages built:
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example
  • warpgate

aarch64-darwin

✅ 3 packages built:
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example
  • warpgate

Copy link
Copy Markdown
Contributor

@B4dM4n B4dM4n left a comment

Choose a reason for hiding this comment

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

Looks good now.
Code generation for -g typescript-fetch and -g go works as expected.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Feb 8, 2026
@B4dM4n
Copy link
Copy Markdown
Contributor

B4dM4n commented Feb 20, 2026

Sadly, the mvnHash has changed again.

I did find the old version on another machine, so I could compare them:

diff -ru /nix/store/fy70ffs137cp2vyz0cb6fcvap8qln6pl-maven-deps-openapi-generator-cli-7.19.0/.m2 /nix/store/facbcga031ni50lw721hzhsc1rli9xkp-maven-deps-openapi-generator-cli-7.19.0/.m2
Only in /nix/store/fy…pl-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension: 2.3.3
Only in /nix/store/fa…kp-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension: 2.3.4
diff -ru /nix/store/fy…pl-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension/maven-metadata-central.xml /nix/store/fa…kp-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension/maven-metadata-central.xml
--- /nix/store/fy…pl-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension/maven-metadata-central.xml	1970-01-01 01:00:01.000000000 +0100
+++ /nix/store/fa…kp-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension/maven-metadata-central.xml	1970-01-01 01:00:01.000000000 +0100
@@ -3,8 +3,8 @@
   <groupId>com.gradle</groupId>
   <artifactId>develocity-maven-extension</artifactId>
   <versioning>
-    <latest>2.3.3</latest>
-    <release>2.3.3</release>
+    <latest>2.3.4</latest>
+    <release>2.3.4</release>
     <versions>
       <version>1.21</version>
       <version>1.21.1</version>
@@ -29,7 +29,8 @@
       <version>2.3.1</version>
       <version>2.3.2</version>
       <version>2.3.3</version>
+      <version>2.3.4</version>
     </versions>
-    <lastUpdated>20260128144206</lastUpdated>
+    <lastUpdated>20260211105713</lastUpdated>
   </versioning>
 </metadata>
diff -ru /nix/store/fy…pl-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension/maven-metadata-central.xml.sha1 /nix/store/fa…kp-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension/maven-metadata-central.xml.sha1
--- /nix/store/fy…pl-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension/maven-metadata-central.xml.sha1	1970-01-01 01:00:01.000000000 +0100
+++ /nix/store/fa…kp-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension/maven-metadata-central.xml.sha1	1970-01-01 01:00:01.000000000 +0100
@@ -1 +1 @@
-d410c5d24945f9c304eb4481be296d5dda02af9c
\ No newline at end of file
+4fc2ea031df4e21684930894a876752cbed49255
\ No newline at end of file

I'm not experienced in using maven, but this is what I can tell from the diff:

During the dependency cache build, maven fetched the latest version information for develocity-maven-extension from the internet and got a different response than the last time (new latest version is 2.3.4).

Digging into the openapi-generator-cli source, I found that the develocity-maven-extension dependency is defined in

https://github.com/OpenAPITools/openapi-generator/blob/v7.19.0/.mvn/extensions.xml#L4-L6

and specifies version 1.23.2. The plugin is configured in

https://github.com/OpenAPITools/openapi-generator/blob/v7.19.0/pom.xml#L408-L422

without any version requirement (which is normal from what I found on the internet), but this seems to prompt maven to fetch the latest version from the internet. So .m2/com/gradle/develocity-maven-extension contains two versions: the correct and used 1.23.2 and the unused 2.3.4.

By adding <version>0</version> to the plugin configuration in pom.xml, I could prevent maven fetching the latest version and producing a (hopefully) stable output without any maven-metadata-central.xml files:

diff --git a/pkgs/by-name/op/openapi-generator-cli/package.nix b/pkgs/by-name/op/openapi-generator-cli/package.nix
index 10c3dc76ac9e..acd79d7a43b6 100644
--- a/pkgs/by-name/op/openapi-generator-cli/package.nix
+++ b/pkgs/by-name/op/openapi-generator-cli/package.nix
@@ -24,7 +24,15 @@ let
       hash = "sha256-16fkBz2TndueBzYq0pLxhxFxxZfF9WsmxQjKzeiqZcU=";
     };

-    mvnHash = "sha256-FlvP8Lx6J74iJCd8xe8JEzE4U6Q9BtZUMLz+BeuPOVE=";
+    postPatch = ''
+      # specifying any version number prevents maven from trying to find the latest one
+      # the real version is defined in `.mvn/extensions.xml`
+      substituteInPlace pom.xml \
+        --replace-fail '<artifactId>develocity-maven-extension</artifactId>' \
+                       '<artifactId>develocity-maven-extension</artifactId><version>0</version>'
+    '';
+
+    mvnHash = "sha256-xENwliF8E7QR6O6kubLVN6oFUcprxNzH/7NzBun4XPE=";
     mvnParameters = "-Duser.home=$TMPDIR";
     doCheck = false;

Resulting changes in the maven-deps:

diff -ru /nix/store/fy70ffs137cp2vyz0cb6fcvap8qln6pl-maven-deps-openapi-generator-cli-7.19.0/.m2 /nix/store/l6gwajyabi86ngsldf18z2lgqdzcqmyx-maven-deps-openapi-generator-cli-7.19.0/.m2
Only in /nix/store/fy…pl-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension: 2.3.3
Only in /nix/store/fy…pl-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension: maven-metadata-central.xml
Only in /nix/store/fy…pl-maven-deps-openapi-generator-cli-7.19.0/.m2/com/gradle/develocity-maven-extension: maven-metadata-central.xml.sha1

This raises the question: should buildMavenPackage refuse to produce a dependency cache output, if any maven-metadata-central.xml (and probably similar names) file exists in the tree. These seem to be the direct result of maven fetching latest version information from the internet, which is inherently unstable and will cause a hash mismatch sooner or later. Just deleting these files is not enough, because the latest version has probably been fetched also.

@booxter booxter changed the title openapi-generator-cli: 7.18.0 -> 7.19.0 openapi-generator-cli: 7.18.0 -> 7.20.0 Mar 21, 2026
@booxter
Copy link
Copy Markdown
Contributor Author

booxter commented Mar 21, 2026

I've crafted a xmlstarlet hook to override pom.xml version, let's give it a try.

@booxter
Copy link
Copy Markdown
Contributor Author

booxter commented Mar 21, 2026

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 483728 --additional-package openapi-generator-cli.passthru.tests
Commit: e64dab6faf42b44856a252dba015d30f08e293cf


x86_64-linux

❌ 1 package failed to build:
  • warpgate
✅ 6 packages built:
  • authentik
  • authentik-outposts.ldap
  • authentik-outposts.proxy
  • authentik-outposts.radius
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example

aarch64-linux

❌ 1 package failed to build:
  • warpgate
✅ 6 packages built:
  • authentik
  • authentik-outposts.ldap
  • authentik-outposts.proxy
  • authentik-outposts.radius
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example

aarch64-darwin

❌ 1 package failed to build:
  • warpgate
✅ 2 packages built:
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example

Error logs: `x86_64-linux`
warpgate
   Compiling sd-notify v0.4.5
   Compiling tracing-log v0.2.0
error: lifetime may not live long enough
   --> /build/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
120 | pub fn build_context<'a, 'b>(provider: &'a (dyn Provider<'b> + 'a)) -> &'a Context<'b> {
    |                      -- lifetime `'a` defined here
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'a` must outlive `'static`
    |
note: raw pointer casts of trait objects cannot extend lifetimes
   --> /build/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this was previously accepted by the compiler but was changed recently
    = help: see <https://github.com/rust-lang/rust/issues/141402> for more information

error: could not compile rsasl (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...


Error logs: `aarch64-linux`
warpgate
   Compiling yasna v0.5.2
   Compiling filetime v0.2.25
error: lifetime may not live long enough
   --> /build/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
120 | pub fn build_context<'a, 'b>(provider: &'a (dyn Provider<'b> + 'a)) -> &'a Context<'b> {
    |                      -- lifetime `'a` defined here
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'a` must outlive `'static`
    |
note: raw pointer casts of trait objects cannot extend lifetimes
   --> /build/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this was previously accepted by the compiler but was changed recently
    = help: see <https://github.com/rust-lang/rust/issues/141402> for more information

error: could not compile rsasl (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...


Error logs: `aarch64-darwin`
warpgate
   Compiling warpgate-database-protocols v0.18.0 (/nix/var/nix/builds/nix-13966-3711777991/source/warpgate-database-protocols)
   Compiling yasna v0.5.2
error: lifetime may not live long enough
   --> /nix/var/nix/builds/nix-13966-3711777991/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
120 | pub fn build_context<'a, 'b>(provider: &'a (dyn Provider<'b> + 'a)) -> &'a Context<'b> {
    |                      -- lifetime `'a` defined here
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'a` must outlive `'static`
    |
note: raw pointer casts of trait objects cannot extend lifetimes
   --> /nix/var/nix/builds/nix-13966-3711777991/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this was previously accepted by the compiler but was changed recently
    = help: see <https://github.com/rust-lang/rust/issues/141402> for more information

error: could not compile rsasl (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

@commiterate
Copy link
Copy Markdown
Contributor

Upstream PR to add a pin: OpenAPITools/openapi-generator#23326

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Mar 23, 2026
@commiterate
Copy link
Copy Markdown
Contributor

Upstream fix merged. The release cadence seems to be monthly and they just released 7.21.0 a few hours ago, so 7.22.0 will probably land mid-April.

@booxter
Copy link
Copy Markdown
Contributor Author

booxter commented Mar 24, 2026

I will fetchpatch then.

@booxter booxter marked this pull request as draft March 24, 2026 16:55
@booxter booxter changed the title openapi-generator-cli: 7.18.0 -> 7.20.0 openapi-generator-cli: 7.18.0 -> 7.21.0 Mar 25, 2026
@booxter booxter marked this pull request as ready for review March 25, 2026 23:25
@booxter
Copy link
Copy Markdown
Contributor Author

booxter commented Mar 25, 2026

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 483728 --additional-package openapi-generator-cli.passthru.tests
Commit: f88494e53da00b552e3d1a0631b665c8506a7b12


x86_64-linux

❌ 1 package failed to build:
  • warpgate
✅ 6 packages built:
  • authentik
  • authentik-outposts.ldap
  • authentik-outposts.proxy
  • authentik-outposts.radius
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example

aarch64-linux

❌ 1 package failed to build:
  • warpgate
✅ 6 packages built:
  • authentik
  • authentik-outposts.ldap
  • authentik-outposts.proxy
  • authentik-outposts.radius
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example

aarch64-darwin

❌ 1 package failed to build:
  • warpgate
✅ 2 packages built:
  • openapi-generator-cli
  • openapi-generator-cli.passthru.tests.example

Error logs: `x86_64-linux`
warpgate
   Compiling x509-parser v0.16.0
   Compiling warpgate-web v0.18.0 (/build/source/warpgate-web)
error: lifetime may not live long enough
   --> /build/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
120 | pub fn build_context<'a, 'b>(provider: &'a (dyn Provider<'b> + 'a)) -> &'a Context<'b> {
    |                      -- lifetime `'a` defined here
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'a` must outlive `'static`
    |
note: raw pointer casts of trait objects cannot extend lifetimes
   --> /build/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this was previously accepted by the compiler but was changed recently
    = help: see <https://github.com/rust-lang/rust/issues/141402> for more information

error: could not compile rsasl (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...


Error logs: `aarch64-linux`
warpgate
   Compiling yaml-rust2 v0.10.2
   Compiling warpgate-database-protocols v0.18.0 (/build/source/warpgate-database-protocols)
error: lifetime may not live long enough
   --> /build/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
120 | pub fn build_context<'a, 'b>(provider: &'a (dyn Provider<'b> + 'a)) -> &'a Context<'b> {
    |                      -- lifetime `'a` defined here
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'a` must outlive `'static`
    |
note: raw pointer casts of trait objects cannot extend lifetimes
   --> /build/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this was previously accepted by the compiler but was changed recently
    = help: see <https://github.com/rust-lang/rust/issues/141402> for more information

error: could not compile rsasl (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...


Error logs: `aarch64-darwin`
warpgate
   Compiling warpgate-database-protocols v0.18.0 (/nix/var/nix/builds/nix-20083-2655203470/source/warpgate-database-protocols)
   Compiling yasna v0.5.2
error: lifetime may not live long enough
   --> /nix/var/nix/builds/nix-20083-2655203470/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
120 | pub fn build_context<'a, 'b>(provider: &'a (dyn Provider<'b> + 'a)) -> &'a Context<'b> {
    |                      -- lifetime `'a` defined here
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'a` must outlive `'static`
    |
note: raw pointer casts of trait objects cannot extend lifetimes
   --> /nix/var/nix/builds/nix-20083-2655203470/warpgate-0.18.0-vendor/source-registry-0/rsasl-2.2.0/src/context.rs:121:16
    |
121 |     unsafe { &*(provider as *const dyn Provider as *const Context) }
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this was previously accepted by the compiler but was changed recently
    = help: see <https://github.com/rust-lang/rust/issues/141402> for more information

error: could not compile rsasl (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

@pbsds pbsds enabled auto-merge April 6, 2026 00:31
@pbsds pbsds closed this Apr 6, 2026
auto-merge was automatically disabled April 6, 2026 00:31

Pull request was closed

@pbsds pbsds reopened this Apr 6, 2026
@pbsds pbsds added this pull request to the merge queue Apr 6, 2026
Merged via the queue into NixOS:master with commit a5dd9e3 Apr 6, 2026
55 of 57 checks passed
ilai-deutel pushed a commit to ilai-deutel/nixpkgs that referenced this pull request Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: openapi-generator-cli

4 participants