Skip to content

feat: embed mirthsync 3.8.1 and expose unordered-collection sorting (0.0.6) - #4

Open
jessesaga wants to merge 2 commits into
mainfrom
feature/mirthsync-3.8.0
Open

jessesaga wants to merge 2 commits into
mainfrom
feature/mirthsync-3.8.0

Conversation

@jessesaga

@jessesaga jessesaga commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Embed mirthsync 3.8.1 (was 3.7.0) in the server and client modules; plugin version 0.0.5 -> 0.0.6 in all four POMs. mirthsync's dependency list is unchanged from 3.7.0, so the runtime whitelist in server/pom.xml still covers it.
  • New "Sort unordered collections" checkbox in Flags & Toggles (property key sortUnordered, stored as "true"/"false"). It is checked by default and included in presets, snapshot/restore and properties load/save. Settings and presets saved before this change have no value for the key, so they read as checked. Unchecking it adds --no-sort-unordered. Checking it adds nothing, because sorting is already mirthsync's default.
  • README: embedded version and the new toggle.

Why

On pull, mirthsync 3.8.0 and later sort collections that Mirth stores in no fixed order (code template context types, library/alert channel IDs, configuration map, etc.), so repeated pulls give stable diffs. After upgrading, the first pull with "Force overwrite" checked produces a one-time commit that only reorders elements. A pull without it doesn't overwrite existing files, because the plugin passes --force only when that box is checked.

mirthsync 3.8.1 (released 2026-10-21) adds a linear-time orphan check on pull (it was quadratic in the channel count) and makes a failed --deploy-all exit nonzero.

Testing

  • ./build.sh succeeds. com.saga-it:mirthsync:3.8.1 resolves from Clojars, and libs/mirthsync-3.8.1.jar is bundled and listed in plugin.xml (pluginVersion 0.0.6). No 3.8.0 jar is bundled.
  • Called the bundled 3.8.1 jar's mirthsync.core.mainFunc directly on the server module's Maven classpath, plus httpmime, which Mirth provides at runtime. --version returns 3.8.1 with exit 0, and -h lists --[no-]sort-unordered.
  • For 3.8.0: a pull with --no-sort-unordered got past option parsing and failed only on the connection, as expected with no server.
  • Not yet tested in the Administrator UI on a live Mirth/OIE instance.

jcdlbs added 2 commits October 1, 2026 17:12
…0.0.6)

mirthsync 3.8.0 sorts collections Mirth stores in no fixed order (code
template context types, library/alert channel ID sets, the configuration
map, etc.) on pull, so repeated pulls produce stable diffs. It is on by
default; --no-sort-unordered keeps the server's order. Bump the
dependency to 3.8.0 in the server and client modules (its dependency
list is identical to 3.7.0, so the runtime whitelist still covers the
closure) and the plugin to 0.0.6 in all four POMs.

Settings panel gains "Sort unordered collections" (property key
sortUnordered), checked by default and mirrored through preset
defaults, the preset serialization key list, snapshot/restore, and
properties load/save. Settings and presets saved before this key
existed have no value for it (or the blank value preset serialization
writes for a missing key), so those read as true. Only the opt-out is
passed to mirthsync: --no-sort-unordered when unchecked, nothing when
checked.

Users will see a one-time commit that only reorders elements on their
first pull after upgrading.
mirthsync 3.8.1 fixes a quadratic orphan check on pull and makes a
failed --deploy-all exit nonzero. Its dependency list is unchanged from
3.8.0, so the runtime whitelist still covers it. The plugin version
stays 0.0.6.

README: the one-time reorder commit only appears on a pull with "Force
overwrite" checked, because mirthsync does not overwrite existing files
on a pull without --force.
@jessesaga jessesaga changed the title feat: embed mirthsync 3.8.0 and expose unordered-collection sorting (0.0.6) feat: embed mirthsync 3.8.1 and expose unordered-collection sorting (0.0.6) Oct 21, 2026
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