Skip to content

Fix zio-json release process#2806

Merged
adamw merged 5 commits intosoftwaremill:masterfrom
mijicd:hotfix/zio-json-release
Feb 16, 2026
Merged

Fix zio-json release process#2806
adamw merged 5 commits intosoftwaremill:masterfrom
mijicd:hotfix/zio-json-release

Conversation

@mijicd
Copy link
Contributor

@mijicd mijicd commented Feb 16, 2026

Resolves issues introduced by #2804:

  • It enabled the native build for zio-json, which wasn't there before (while possible, it needs a bit work)
  • Restored "Enable Native-specific modules" release condition (i.e. target-platform does not exist there 🤦‍♂️, see 923fbe7)
  • Adjusted "Enable Loom-specific modules" release condition (the same as previous, see 39ef8bc)

Before submitting pull request:

  • Check if the project compiles by running sbt compile
  • Verify docs compilation by running sbt compileDocs
  • Check if tests pass by running sbt test
  • Format code by running sbt scalafmt

@mijicd mijicd changed the title Remove zio-json from loom projects Fix zio-json release process Feb 16, 2026
run: echo "ONLY_LOOM=1" >> $GITHUB_ENV
run: |
echo "WITH_ZIO=1" >> $GITHUB_ENV
echo "ALSO_LOOM=1" >> $GITHUB_ENV
Copy link
Contributor Author

@mijicd mijicd Feb 16, 2026

Choose a reason for hiding this comment

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

Given that target-platform and scala-version don't exist in release steps, ZIO and Loom-specific module steps are merged. We have two options here:

  • using ALSO_LOOM which activates all projects
  • using ONLY_LOOM and leaving zioJson as loom project to restrict the amount of projects affected (also note that JVM / 3 / 21 compiles only loom projects)

@adamw Please advice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively, we can replace WITH_ZIO with ONLY_ZIO and ALSO_ZIO and then make sure to use ONLY_ZIO in publishing for 21 (combined with ALSO_LOOM, thus releasing 3 projects that are java 21 built, while the rest falls under 11), and using ALSO_ZIO in compilation/test, where appropriate, so that everything is properly tested under java 21.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO, using ONLY_LOOM and leaving zio-json as loom project is the simplest approach. Now that I adjusted the release predictate, it should work without any problems. Let me know if I should adjust it.

@adamw adamw marked this pull request as ready for review February 16, 2026 15:54
Copilot AI review requested due to automatic review settings February 16, 2026 15:54
sudo apt-get update
sudo apt-get install libidn2-dev libcurl3-dev
- name: Enable Native-specific modules
if: matrix.target-platform == 'Native'
Copy link
Member

Choose a reason for hiding this comment

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

hm I think this should remain unchanged?

Copy link
Contributor Author

@mijicd mijicd Feb 16, 2026

Choose a reason for hiding this comment

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

It must be changed, that's a bug I accidentally introduced. publish job does not have a build matrix that includes the target-platform. I restored it to the state before my change.

Copy link
Member

Choose a reason for hiding this comment

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

nevermind ;)

Copy link
Member

Choose a reason for hiding this comment

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

yeah I read far enough into the code :)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes issues with the zio-json release process that were introduced by PR #2804, which upgraded zio-json. The main fix removes the accidentally-enabled native platform support for zio-json (which requires additional work to properly support) and adjusts the CI workflow conditions for enabling platform-specific modules during releases.

Changes:

  • Removed .nativePlatform configuration from zioJson module in build.sbt
  • Changed Native-specific modules condition from matrix.target-platform == 'Native' to matrix.java == '11'
  • Consolidated "Enable ZIO-specific modules" and "Enable Loom-specific modules" steps into a single step for Java 21

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
build.sbt Removed nativePlatform support from zioJson module to match its actual capabilities
.github/workflows/ci.yml Updated release workflow conditions to use Java version instead of non-existent target-platform matrix variable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: echo "WITH_ZIO=1" >> $GITHUB_ENV
- name: Enable Loom-specific modules
if: matrix.target-platform == 'JVM' && matrix.java == '21' && matrix.scala-version == '3'
run: echo "ONLY_LOOM=1" >> $GITHUB_ENV
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The Java 21 step needs to also set WITH_ZIO=1 environment variable. Looking at build.sbt lines 198-204, when WITH_ZIO is not defined, zioJson projects are filtered out from the aggregate. Since zioJson is part of loomProjects (line 179), setting only ONLY_LOOM=1 without WITH_ZIO=1 will result in zioJson being excluded before the loom filter is applied. This means zioJson modules won't be published during the Java 21 release job.

Suggested change
run: echo "ONLY_LOOM=1" >> $GITHUB_ENV
run: |
echo "ONLY_LOOM=1" >> $GITHUB_ENV
echo "WITH_ZIO=1" >> $GITHUB_ENV

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adamw Copilot's remark is in place. Please don't merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, you already did 😄 Then, please don't release :)

Copy link
Member

Choose a reason for hiding this comment

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

ah sorry, I already did, with another PR. And I once again didn't catch the problem, I must pay closer attention next time. New PR?

@adamw adamw merged commit 33111d7 into softwaremill:master Feb 16, 2026
28 checks passed
@adamw
Copy link
Member

adamw commented Feb 16, 2026

Let's try :)

mijicd added a commit to mijicd/sttp that referenced this pull request Feb 16, 2026
@adamw Applying Copilot's correct review suggestion softwaremill#2806 (comment)
@mijicd
Copy link
Contributor Author

mijicd commented Feb 16, 2026

@adamw We rushed 😢 Copilot's comment above is in place, addressed #2809

@adamw
Copy link
Member

adamw commented Feb 16, 2026

No harm done, I cancelled the other release and will make a new one :)

@mijicd mijicd deleted the hotfix/zio-json-release branch February 16, 2026 16:17
adamw pushed a commit that referenced this pull request Feb 16, 2026
@adamw Applying Copilot's correct review suggestion
#2806 (comment)

Before submitting pull request:
- [x] Check if the project compiles by running `sbt compile`
- [x] Verify docs compilation by running `sbt compileDocs`
- [x] Check if tests pass by running `sbt test`
- [x] Format code by running `sbt scalafmt`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments