Skip to content

core: drop support of chat versions older than 08/2024 - #7319

Merged
epoberezkin merged 11 commits into
masterfrom
ep/drop-old-versions
Jul 29, 2026
Merged

core: drop support of chat versions older than 08/2024#7319
epoberezkin merged 11 commits into
masterfrom
ep/drop-old-versions

Conversation

@epoberezkin

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/Simplex/Chat/Library/Internal.hs
Comment thread tests/ChatTests/Groups.hs

@simplex-chat-agent simplex-chat-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mechanical, well-scoped removal of pre-08/2024 chat version support. initialChatVersion moves from 1 to 9 (the old batchSend2Version), the intermediate version constants (groupDirectInvVersionbatchSend2Version, plus agentToChatVersion) are deleted, and every supportsVersion/>= someVersion gate for versions ≤ 9 is dropped as now-always-true. I traced the removed symbols (getGroupLinkId, createNewContactMemberAsync, setNewContactMemberConnRequest, CEvtSentGroupInvitation, all removed version constants) and confirmed no remaining references. Removed constructors/functions that are still referenced elsewhere (CFCreateConnGrpInv kept as deprecated for stored-command decoding; viewSentGroupInvitation, getContactViaMember, sendAutoReply still used by non-legacy paths) are correctly retained. The lost legacy CON/SENT/JOINED auto-reply and group-link-join branches are all still covered by the current-version paths. Bindings default to chatInitialVRange (now 9-9) which is consistent with the new floor. No correctness, security, or concurrency issues found.

Minor cleanup left by the deletions (all non-fatal warnings, not build breaks — the library stanza uses -Weverything but only a specific -Werror= allowlist):

  • encodeConnInfoPQ (Internal.hs:2254) no longer uses its VersionChat parameter after the v >= pqEncryptionCompressionVersion guard was removed. The param is now dead at all six call sites; worth removing the argument in a follow-up (interface fix rather than leaving a threaded-but-ignored version).
  • memberSendAction (Internal.hs:2569) still binds memberRole in its field-pun pattern, but the only use (sendBatchedOrSeparate) was deleted. Drop it from the pun. (Signature line is outside the diff, so no inline suggestion.)
  • mcvr unused after dropping the groupDirectInvVersion guard — inline suggestion below.

Disabled tests: testGroupDelayedModeration / …FullDelete are xit-ed because they configure chatVRange = (1,3), now below the supported floor — dropping them follows from the support removal, and the corresponding chat_item_moderations query plans drop out of the generated plan file for the same reason. Consider deleting the now-unreachable test bodies rather than leaving them as xit. The testGroupLinkMemberRole threadDelay bump (100ms→250ms) is an unrelated flakiness tweak. ProtocolTests.hs changes are mechanical version-string updates to the encoded test vectors (1→9); no assertions were weakened or skipped.

Comment thread src/Simplex/Chat/Library/Subscriber.hs
@epoberezkin
epoberezkin merged commit f1418f9 into master Jul 29, 2026
11 of 12 checks passed
@epoberezkin
epoberezkin deleted the ep/drop-old-versions branch July 29, 2026 18:06
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants