Skip to content

Rename "stream" within codebase to "channel"  #631

Open
@gnprice

Description

@gnprice

This is a follow-up to:

After renaming "stream" to "channel" in the UI, we should do the same throughout our code. The changes for this issue should be purely NFC — user-visible changes are in #630 or other issues.

There are some places in the Zulip server API where the word "stream" appears. The API isn't immediately changing — we'll probably rename all of those eventually, but that'll be a longer migration over time — but even for those, we should still update the names within our code to use the new terminology. For an example, see UnreadMessagesSnapshot.dms:

  @JsonKey(name: 'pms')
  final List<UnreadDmSnapshot> dms;

Related issues:


Updates on the approach, from discussion on #801:

(1) How to split the changes into commits, and how to group those into PRs: #801 (comment)
and continued at #801 (comment)

(2) A grep command to get a list of types with the word "stream" in their names:

$ git grep -howP '([A-Z]\w*)?Stream\w*' | sort | uniq -c | sort -rn
     75 StreamNarrow
     66 StreamColorSwatch
     50 ZulipStream
     34 StreamMessage
     32 StreamColorSwatches
[…]

(We also want to rename variables, fields, etc., not just types; but per (1), types are how the rename is organized)

(3) For review on the remaining PRs in this issue, let's use an abbreviated process (#801 (comment)) where we go straight from buddy review to integration review, skipping mentor review and maintainer review. On the one hand there'll generally be less to review in them; and on the other, this sort of cross-codebase refactor is especially prone to developing conflicts, so it's especially good to get them merged soon after they're sent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    server-9Things new in Zulip Server 9.0

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions