[term] x/term: exposing history based on proposal discussion

13 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Mar 21, 2025, 2:24:15 AMMar 21
to goph...@pubsubhelper.golang.org, Laurent Demailly, golang-co...@googlegroups.com

Gerrit Bot has uploaded the change for review

Commit message

x/term: exposing history based on proposal discussion

https://github.com/golang/go/issues/68780#issuecomment-2737508310
Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
GitHub-Last-Rev: b9f8be7d8922fc20afb6c02a2336a3b4604c029b
GitHub-Pull-Request: golang/term#20

Change diff

diff --git a/terminal.go b/terminal.go
index 14f8947..f7b5195 100644
--- a/terminal.go
+++ b/terminal.go
@@ -36,6 +36,16 @@
Reset: []byte{keyEscape, '[', '0', 'm'},
}

+type History interface {
+ // adds a new line into the history
+ Add(string)
+
+ // retrieves a line from history
+ // 0 should be the most recent entry
+ // ok = false when out of range
+ At(idx int) (string, bool)
+}
+
// Terminal contains the state for running a VT100 terminal that is capable of
// reading lines of input.
type Terminal struct {
@@ -86,9 +96,10 @@
remainder []byte
inBuf [256]byte

- // history contains previously entered commands so that they can be
+ // History allows to replace the default implementation of the history
+ // which contains previously entered commands so that they can be
// accessed with the up and down keys.
- history stRingBuffer
+ History History
// historyIndex stores the currently accessed history entry, where zero
// means the immediately previous entry.
historyIndex int
@@ -111,6 +122,7 @@
termHeight: 24,
echo: true,
historyIndex: -1,
+ History: &stRingBuffer{},
}
}

@@ -497,7 +509,7 @@
t.pos = len(t.line)
t.moveCursorToPos(t.pos)
case keyUp:
- entry, ok := t.history.NthPreviousEntry(t.historyIndex + 1)
+ entry, ok := t.History.At(t.historyIndex + 1)
if !ok {
return "", false
}
@@ -516,7 +528,7 @@
t.setLine(runes, len(runes))
t.historyIndex--
default:
- entry, ok := t.history.NthPreviousEntry(t.historyIndex - 1)
+ entry, ok := t.History.At(t.historyIndex - 1)
if ok {
t.historyIndex--
runes := []rune(entry)
@@ -781,7 +793,7 @@
if lineOk {
if t.echo {
t.historyIndex = -1
- t.history.Add(line)
+ t.History.Add(line)
}
if lineIsPasted {
err = ErrPasteIndicator
@@ -942,7 +954,7 @@
// If n is zero then the immediately prior value is returned, if one, then the
// next most recent, and so on. If such an element doesn't exist then ok is
// false.
-func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) {
+func (s *stRingBuffer) At(n int) (value string, ok bool) {
if n < 0 || n >= s.size {
return "", false
}

Change information

Files:
  • M terminal.go
Change size: S
Delta: 1 file changed, 18 insertions(+), 6 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: term
Gerrit-Branch: master
Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
Gerrit-Change-Number: 659835
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Gopher Robot (Gerrit)

unread,
Mar 21, 2025, 2:24:16 AMMar 21
to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gopher Robot added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Gopher Robot . unresolved

I spotted some possible problems.

These findings are based on simple heuristics. If a finding appears wrong, briefly reply here saying so. Otherwise, please address any problems and update the GitHub PR. When complete, mark this comment as 'Done' and click the [blue 'Reply' button](https://go.dev/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it) above.

Possible problems detected:
1. Are you describing the change in complete sentences with correct punctuation in the commit message body, including ending sentences with periods?
2. You usually need to reference a bug number for all but trivial or cosmetic fixes. For the term repo, the format is usually 'Fixes golang/go#12345' or 'Updates golang/go#12345' at the end of the commit message. Should you have a bug reference?

The commit title and commit message body come from the GitHub PR title and description, and must be edited in the GitHub web interface (not via git). For instructions, see [here](https://go.dev/wiki/GerritBot/#how-does-gerritbot-determine-the-final-commit-message). For guidelines on commit messages for the Go project, see [here](https://go.dev/doc/contribute#commit_messages).


(In general for Gerrit code reviews, the change author is expected to [log in to Gerrit](https://go-review.googlesource.com/login/) with a Gmail or other Google account and then close out each piece of feedback by marking it as 'Done' if implemented as suggested or otherwise reply to each review comment. See the [Review](https://go.dev/doc/contribute#review) section of the Contributing Guide for details.)

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: term
    Gerrit-Branch: master
    Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
    Gerrit-Change-Number: 659835
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
    Gerrit-Comment-Date: Fri, 21 Mar 2025 06:24:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Gerrit Bot (Gerrit)

    unread,
    Mar 21, 2025, 2:39:19 AMMar 21
    to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Gerrit Bot uploaded new patchset

    Gerrit Bot uploaded patch set #2 to this change.
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: term
    Gerrit-Branch: master
    Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
    Gerrit-Change-Number: 659835
    Gerrit-PatchSet: 2
    unsatisfied_requirement
    open
    diffy

    Gerrit Bot (Gerrit)

    unread,
    Mar 21, 2025, 3:46:15 AMMar 21
    to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Gerrit Bot uploaded new patchset

    Gerrit Bot uploaded patch set #3 to this change.
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: term
    Gerrit-Branch: master
    Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
    Gerrit-Change-Number: 659835
    Gerrit-PatchSet: 3
    unsatisfied_requirement
    open
    diffy

    Gerrit Bot (Gerrit)

    unread,
    Mar 21, 2025, 4:09:51 AMMar 21
    to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Gerrit Bot uploaded new patchset

    Gerrit Bot uploaded patch set #4 to this change.
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: term
    Gerrit-Branch: master
    Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
    Gerrit-Change-Number: 659835
    Gerrit-PatchSet: 4
    unsatisfied_requirement
    open
    diffy

    Laurent Demailly (Gerrit)

    unread,
    Mar 21, 2025, 4:14:22 AMMar 21
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Gopher Robot, golang-co...@googlegroups.com

    Laurent Demailly added 1 comment

    Patchset-level comments
    File-level comment, Patchset 1:
    Gopher Robot . resolved

    I spotted some possible problems.

    These findings are based on simple heuristics. If a finding appears wrong, briefly reply here saying so. Otherwise, please address any problems and update the GitHub PR. When complete, mark this comment as 'Done' and click the [blue 'Reply' button](https://go.dev/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it) above.

    Possible problems detected:
    1. Are you describing the change in complete sentences with correct punctuation in the commit message body, including ending sentences with periods?
    2. You usually need to reference a bug number for all but trivial or cosmetic fixes. For the term repo, the format is usually 'Fixes golang/go#12345' or 'Updates golang/go#12345' at the end of the commit message. Should you have a bug reference?

    The commit title and commit message body come from the GitHub PR title and description, and must be edited in the GitHub web interface (not via git). For instructions, see [here](https://go.dev/wiki/GerritBot/#how-does-gerritbot-determine-the-final-commit-message). For guidelines on commit messages for the Go project, see [here](https://go.dev/doc/contribute#commit_messages).


    (In general for Gerrit code reviews, the change author is expected to [log in to Gerrit](https://go-review.googlesource.com/login/) with a Gmail or other Google account and then close out each piece of feedback by marking it as 'Done' if implemented as suggested or otherwise reply to each review comment. See the [Review](https://go.dev/doc/contribute#review) section of the Contributing Guide for details.)

    Laurent Demailly

    Done

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: term
      Gerrit-Branch: master
      Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
      Gerrit-Change-Number: 659835
      Gerrit-PatchSet: 4
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
      Gerrit-Comment-Date: Fri, 21 Mar 2025 08:14:15 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Gopher Robot <go...@golang.org>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Gerrit Bot (Gerrit)

      unread,
      Mar 21, 2025, 4:17:55 AMMar 21
      to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

      Gerrit Bot uploaded new patchset

      Gerrit Bot uploaded patch set #5 to this change.
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: term
      Gerrit-Branch: master
      Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
      Gerrit-Change-Number: 659835
      Gerrit-PatchSet: 5
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Gerrit Bot (Gerrit)

      unread,
      Mar 21, 2025, 4:33:53 AMMar 21
      to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

      Gerrit Bot uploaded new patchset

      Gerrit Bot uploaded patch set #6 to this change.
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: term
      Gerrit-Branch: master
      Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
      Gerrit-Change-Number: 659835
      Gerrit-PatchSet: 6
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Gerrit Bot (Gerrit)

      unread,
      Mar 21, 2025, 12:06:32 PMMar 21
      to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

      Gerrit Bot uploaded new patchset

      Gerrit Bot uploaded patch set #7 to this change.
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: term
      Gerrit-Branch: master
      Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
      Gerrit-Change-Number: 659835
      Gerrit-PatchSet: 7
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Ian Lance Taylor (Gerrit)

      unread,
      Mar 21, 2025, 12:59:14 PMMar 21
      to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com

      Ian Lance Taylor voted and added 1 comment

      Votes added by Ian Lance Taylor

      Hold+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 7 (Latest):
      Ian Lance Taylor . resolved

      Putting on hold for proposal.

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Holds
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: term
        Gerrit-Branch: master
        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
        Gerrit-Change-Number: 659835
        Gerrit-PatchSet: 7
        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
        Gerrit-Comment-Date: Fri, 21 Mar 2025 16:59:10 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Gerrit Bot (Gerrit)

        unread,
        Apr 2, 2025, 5:32:11 PMApr 2
        to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
        Attention needed from Ian Lance Taylor

        Gerrit Bot uploaded new patchset

        Gerrit Bot uploaded patch set #8 to this change.
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ian Lance Taylor
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Holds
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: newpatchset
        Gerrit-Project: term
        Gerrit-Branch: master
        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
        Gerrit-Change-Number: 659835
        Gerrit-PatchSet: 8
        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Gerrit Bot (Gerrit)

        unread,
        Apr 16, 2025, 4:41:11 PMApr 16
        to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
        Attention needed from Ian Lance Taylor

        Gerrit Bot uploaded new patchset

        Gerrit Bot uploaded patch set #9 to this change.
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ian Lance Taylor
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Holds
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: newpatchset
        Gerrit-Project: term
        Gerrit-Branch: master
        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
        Gerrit-Change-Number: 659835
        Gerrit-PatchSet: 9
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Gerrit Bot (Gerrit)

        unread,
        Apr 16, 2025, 4:49:11 PMApr 16
        to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
        Attention needed from Ian Lance Taylor

        Gerrit Bot uploaded new patchset

        Gerrit Bot uploaded patch set #10 to this change.
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ian Lance Taylor
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Holds
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: newpatchset
        Gerrit-Project: term
        Gerrit-Branch: master
        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
        Gerrit-Change-Number: 659835
        Gerrit-PatchSet: 10
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Laurent Demailly (Gerrit)

        unread,
        Apr 16, 2025, 5:09:22 PMApr 16
        to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
        Attention needed from Ian Lance Taylor

        Laurent Demailly added 1 comment

        Patchset-level comments
        File-level comment, Patchset 7:
        Ian Lance Taylor . unresolved

        Putting on hold for proposal.

        Laurent Demailly

        Can you un-hold it now that the proposal has been accepted? thank you!

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ian Lance Taylor
        Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Holds
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: term
          Gerrit-Branch: master
          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
          Gerrit-Change-Number: 659835
          Gerrit-PatchSet: 10
          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Comment-Date: Wed, 16 Apr 2025 21:09:19 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
          unsatisfied_requirement
          open
          diffy

          Sean Liao (Gerrit)

          unread,
          Apr 16, 2025, 5:46:37 PMApr 16
          to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Ian Lance Taylor

          Sean Liao added 8 comments

          Commit Message
          Line 7, Patchset 10 (Latest):x/term: support pluggable history
          Sean Liao . unresolved

          term:

          Line 9, Patchset 10 (Latest):Implements accepted proposal https://github.com/golang/go/issues/68780#issuecomment-2810426043

          (version 3)
          ---
          Version 2 of https://github.com/golang/term/pull/15 - Much less footprint/changes in x/term in exchange for duplication and much more in callers (https://github.com/fortio/terminal/pull/85), including fairly tricky/obscure handling of adding to history automatically or not.
          File terminal.go
          Line 40, Patchset 10 (Latest):// The History interface provides a way to replace the default automatic
          Sean Liao . unresolved

          Use the comments as approved.

          Line 115, Patchset 10 (Latest): // History allows to replace the default implementation of the history
          Sean Liao . unresolved

          Replacing is a secondary concern, it should document what this field does,
          and the default value if left unset.

          Line 485, Patchset 10 (Latest): defer t.lock.Lock()
          Sean Liao . unresolved

          locks seem unnecessary?

          Line 830, Patchset 10 (Latest): t.historyAdd(line) // so this can output without deadlock.
          Sean Liao . unresolved

          is this comment necessary?

          Line 997, Patchset 10 (Latest): panic(fmt.Sprintf("stRingBuffer: index [%d] out of range [0,%d)", n, s.size))
          Sean Liao . unresolved

          let's not panic with the name of an internal type
          term: history index ...

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ian Lance Taylor
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Holds
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: term
          Gerrit-Branch: master
          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
          Gerrit-Change-Number: 659835
          Gerrit-PatchSet: 10
          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
          Gerrit-CC: Sean Liao <se...@liao.dev>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Comment-Date: Wed, 16 Apr 2025 21:46:30 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          unsatisfied_requirement
          open
          diffy

          Gerrit Bot (Gerrit)

          unread,
          Apr 16, 2025, 5:57:42 PMApr 16
          to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
          Attention needed from Ian Lance Taylor

          Gerrit Bot uploaded new patchset

          Gerrit Bot uploaded patch set #11 to this change.
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ian Lance Taylor
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Holds
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: newpatchset
          Gerrit-Project: term
          Gerrit-Branch: master
          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
          Gerrit-Change-Number: 659835
          Gerrit-PatchSet: 11
          unsatisfied_requirement
          open
          diffy

          Laurent Demailly (Gerrit)

          unread,
          Apr 16, 2025, 6:03:33 PMApr 16
          to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Ian Lance Taylor and Sean Liao

          Laurent Demailly added 7 comments

          Patchset-level comments
          File-level comment, Patchset 10:
          Laurent Demailly . resolved

          Thanks! updated (not some godoc (yet) as I think a merge between the 2 is needed to achieve both goals)

          Commit Message
          Line 7, Patchset 10:x/term: support pluggable history
          Sean Liao . resolved

          term:

          Laurent Demailly

          Done



          (version 3)
          ---
          Version 2 of https://github.com/golang/term/pull/15 - Much less footprint/changes in x/term in exchange for duplication and much more in callers (https://github.com/fortio/terminal/pull/85), including fairly tricky/obscure handling of adding to history automatically or not.
          Sean Liao . resolved
          Laurent Demailly

          Done

          Line 15, Patchset 10:Fixes https://github.com/golang/go/issues/68780#issuecomment-2737508310
          Sean Liao . resolved

          Fixes golang/go#68780

          Laurent Demailly

          Done

          File terminal.go
          Line 485, Patchset 10: defer t.lock.Lock()
          Sean Liao . unresolved

          locks seem unnecessary?

          Laurent Demailly

          it's very much necessary to _unlock_ so out can be used in History without deadlock

          Line 830, Patchset 10: t.historyAdd(line) // so this can output without deadlock.
          Sean Liao . resolved

          is this comment necessary?

          Laurent Demailly

          will move it above, it's from when the unlock relock was inlined there

          Line 997, Patchset 10: panic(fmt.Sprintf("stRingBuffer: index [%d] out of range [0,%d)", n, s.size))
          Sean Liao . resolved

          let's not panic with the name of an internal type
          term: history index ...

          Laurent Demailly

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ian Lance Taylor
          • Sean Liao
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Holds
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: term
          Gerrit-Branch: master
          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
          Gerrit-Change-Number: 659835
          Gerrit-PatchSet: 10
          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
          Gerrit-CC: Sean Liao <se...@liao.dev>
          Gerrit-Attention: Sean Liao <se...@liao.dev>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Comment-Date: Wed, 16 Apr 2025 22:03:28 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Sean Liao <se...@liao.dev>
          unsatisfied_requirement
          open
          diffy

          Gerrit Bot (Gerrit)

          unread,
          Apr 16, 2025, 6:04:59 PMApr 16
          to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
          Attention needed from Ian Lance Taylor and Sean Liao

          Gerrit Bot uploaded new patchset

          Gerrit Bot uploaded patch set #12 to this change.
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ian Lance Taylor
          • Sean Liao
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Holds
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: newpatchset
          Gerrit-Project: term
          Gerrit-Branch: master
          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
          Gerrit-Change-Number: 659835
          Gerrit-PatchSet: 12
          unsatisfied_requirement
          open
          diffy

          Laurent Demailly (Gerrit)

          unread,
          Apr 16, 2025, 6:11:08 PMApr 16
          to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Ian Lance Taylor and Sean Liao

          Laurent Demailly added 1 comment

          File terminal.go
          Line 40, Patchset 10:// The History interface provides a way to replace the default automatic
          Sean Liao . unresolved

          Use the comments as approved.

          Laurent Demailly

          I think the approved comments are missing the "how/why do I implement this new History interface" to achieve "pluggable" side of the story and are abstract about how is History used. I welcome some suggestion to merge the 2 concerns.
          (though I can also just remove the additional context if necessary)

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ian Lance Taylor
          • Sean Liao
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Holds
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: term
          Gerrit-Branch: master
          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
          Gerrit-Change-Number: 659835
          Gerrit-PatchSet: 12
          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
          Gerrit-CC: Sean Liao <se...@liao.dev>
          Gerrit-Attention: Sean Liao <se...@liao.dev>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Comment-Date: Wed, 16 Apr 2025 22:11:04 +0000
          unsatisfied_requirement
          open
          diffy

          Gerrit Bot (Gerrit)

          unread,
          Apr 16, 2025, 6:27:18 PMApr 16
          to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
          Attention needed from Ian Lance Taylor and Sean Liao

          Gerrit Bot uploaded new patchset

          Gerrit Bot uploaded patch set #13 to this change.
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ian Lance Taylor
          • Sean Liao
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Holds
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: newpatchset
          Gerrit-Project: term
          Gerrit-Branch: master
          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
          Gerrit-Change-Number: 659835
          Gerrit-PatchSet: 13
          unsatisfied_requirement
          open
          diffy

          Austin Clements (Gerrit)

          unread,
          Apr 17, 2025, 11:24:10 AMApr 17
          to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Ian Lance Taylor and Sean Liao

          Austin Clements added 6 comments

          Patchset-level comments
          File-level comment, Patchset 13 (Latest):
          Austin Clements . resolved

          Code LGTM, just some comments on comments.

          File terminal.go
          Line 40, Patchset 10:// The History interface provides a way to replace the default automatic
          Sean Liao . unresolved

          Use the comments as approved.

          Laurent Demailly

          I think the approved comments are missing the "how/why do I implement this new History interface" to achieve "pluggable" side of the story and are abstract about how is History used. I welcome some suggestion to merge the 2 concerns.
          (though I can also just remove the additional context if necessary)

          Austin Clements

          I think it's a good idea to add context, but let's put the summary first. How about:

          // A History provides a (possibly bounded) queue of input lines read by [ReadLine].
          //
          // The default implementation of History provides a simple ring buffer limited
          // to 100 slots. Clients can provide alternate implementations of History to
          // change this behavior.

          Line 46, Patchset 13 (Latest): // the entry being added (e.g.,, if it's a whitespace-only entry),
          Austin Clements . unresolved

          Extra ","

          Line 49, Patchset 13 (Latest): // Add will be called by Terminal to add a new line into the history.
          Austin Clements . unresolved

          Maybe "[Terminal.ReadLine]" just to be specific?

          Line 50, Patchset 13 (Latest): // An implementation may decide to not add every lines by ignoring calls
          Austin Clements . unresolved

          Isn't this last sentence redundant with the "It is allowed to drop any entry ..." sentence above?

          Line 115, Patchset 10: // History allows to replace the default implementation of the history
          Sean Liao . unresolved

          Replacing is a secondary concern, it should document what this field does,
          and the default value if left unset.

          Austin Clements

          In the proposal, the doc comment is:

                  // History records and retrieves lines of input read by [ReadLine].
          //
          // It is not safe to call ReadLine concurrently with any methods on History.
          //
          // [NewTerminal] sets this to an implementation that records the last 100 lines of input.

          It certainly doesn't have to be this word for word, but I think it captures a few important things: it says what the field does, as Sean pointed out; and it says what the default value is.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ian Lance Taylor
          • Sean Liao
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Holds
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: term
          Gerrit-Branch: master
          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
          Gerrit-Change-Number: 659835
          Gerrit-PatchSet: 13
          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-CC: Austin Clements <aus...@google.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
          Gerrit-CC: Sean Liao <se...@liao.dev>
          Gerrit-Attention: Sean Liao <se...@liao.dev>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Comment-Date: Thu, 17 Apr 2025 15:24:06 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Laurent Demailly <ldem...@gmail.com>
          Comment-In-Reply-To: Sean Liao <se...@liao.dev>
          unsatisfied_requirement
          open
          diffy

          Austin Clements (Gerrit)

          unread,
          Apr 17, 2025, 11:24:26 AMApr 17
          to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Ian Lance Taylor and Sean Liao

          Austin Clements removed a vote from this change

          Removed Hold+1 by Ian Lance Taylor <ia...@golang.org>
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Ian Lance Taylor
          • Sean Liao
          Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: deleteVote
            unsatisfied_requirement
            open
            diffy

            Austin Clements (Gerrit)

            unread,
            Apr 17, 2025, 11:24:46 AMApr 17
            to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Ian Lance Taylor, Laurent Demailly and Sean Liao

            Austin Clements added 1 comment

            Patchset-level comments
            File-level comment, Patchset 7:
            Ian Lance Taylor . resolved

            Putting on hold for proposal.

            Laurent Demailly

            Can you un-hold it now that the proposal has been accepted? thank you!

            Austin Clements

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Ian Lance Taylor
            • Laurent Demailly
            • Sean Liao
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: term
            Gerrit-Branch: master
            Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
            Gerrit-Change-Number: 659835
            Gerrit-PatchSet: 13
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-CC: Austin Clements <aus...@google.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
            Gerrit-CC: Sean Liao <se...@liao.dev>
            Gerrit-Attention: Laurent Demailly <ldem...@gmail.com>
            Gerrit-Attention: Sean Liao <se...@liao.dev>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Comment-Date: Thu, 17 Apr 2025 15:24:41 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Laurent Demailly <ldem...@gmail.com>
            Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
            unsatisfied_requirement
            open
            diffy

            Laurent Demailly (Gerrit)

            unread,
            Apr 17, 2025, 1:16:45 PMApr 17
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Austin Clements, Ian Lance Taylor and Sean Liao

            Laurent Demailly added 6 comments

            Patchset-level comments
            File-level comment, Patchset 13 (Latest):
            Laurent Demailly . resolved

            Thanks for the thoughtful comments - ptal

            File terminal.go
            Line 40, Patchset 10:// The History interface provides a way to replace the default automatic
            Sean Liao . resolved

            Use the comments as approved.

            Laurent Demailly

            I think the approved comments are missing the "how/why do I implement this new History interface" to achieve "pluggable" side of the story and are abstract about how is History used. I welcome some suggestion to merge the 2 concerns.
            (though I can also just remove the additional context if necessary)

            Austin Clements

            I think it's a good idea to add context, but let's put the summary first. How about:

            // A History provides a (possibly bounded) queue of input lines read by [ReadLine].
            //
            // The default implementation of History provides a simple ring buffer limited
            // to 100 slots. Clients can provide alternate implementations of History to
            // change this behavior.

            Laurent Demailly

            Done

            Line 46, Patchset 13 (Latest): // the entry being added (e.g.,, if it's a whitespace-only entry),
            Austin Clements . resolved

            Extra ","

            Laurent Demailly

            Done

            Line 49, Patchset 13 (Latest): // Add will be called by Terminal to add a new line into the history.
            Austin Clements . resolved

            Maybe "[Terminal.ReadLine]" just to be specific?

            Laurent Demailly

            Done

            Line 50, Patchset 13 (Latest): // An implementation may decide to not add every lines by ignoring calls
            Austin Clements . unresolved

            Isn't this last sentence redundant with the "It is allowed to drop any entry ..." sentence above?

            Laurent Demailly

            Thanks for the comments. I removed it and merged the 2. lmk (after you see the next rev)

            Line 115, Patchset 10: // History allows to replace the default implementation of the history
            Sean Liao . unresolved

            Replacing is a secondary concern, it should document what this field does,
            and the default value if left unset.

            Austin Clements

            In the proposal, the doc comment is:

                    // History records and retrieves lines of input read by [ReadLine].
            //
            // It is not safe to call ReadLine concurrently with any methods on History.
            //
            // [NewTerminal] sets this to an implementation that records the last 100 lines of input.

            It certainly doesn't have to be this word for word, but I think it captures a few important things: it says what the field does, as Sean pointed out; and it says what the default value is.

            Laurent Demailly

            yes I missed that part across multiple rev/copy paste/changes. fixing (there was the original text with mention of up/down keys, do we drop that? [it was on non exposed field so more a dev comment])

            ps: seems like [links] don't work in struct comments

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Austin Clements
            • Ian Lance Taylor
            • Sean Liao
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: term
            Gerrit-Branch: master
            Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
            Gerrit-Change-Number: 659835
            Gerrit-PatchSet: 13
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-CC: Austin Clements <aus...@google.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
            Gerrit-CC: Sean Liao <se...@liao.dev>
            Gerrit-Attention: Austin Clements <aus...@google.com>
            Gerrit-Attention: Sean Liao <se...@liao.dev>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Comment-Date: Thu, 17 Apr 2025 17:16:40 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Austin Clements <aus...@google.com>
            Comment-In-Reply-To: Laurent Demailly <ldem...@gmail.com>
            Comment-In-Reply-To: Sean Liao <se...@liao.dev>
            unsatisfied_requirement
            open
            diffy

            Laurent Demailly (Gerrit)

            unread,
            Apr 17, 2025, 1:17:36 PMApr 17
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Austin Clements, Ian Lance Taylor and Sean Liao

            Laurent Demailly added 1 comment

            File terminal.go
            Line 115, Patchset 10: // History allows to replace the default implementation of the history
            Sean Liao . resolved

            Replacing is a secondary concern, it should document what this field does,
            and the default value if left unset.

            Austin Clements

            In the proposal, the doc comment is:

                    // History records and retrieves lines of input read by [ReadLine].
            //
            // It is not safe to call ReadLine concurrently with any methods on History.
            //
            // [NewTerminal] sets this to an implementation that records the last 100 lines of input.

            It certainly doesn't have to be this word for word, but I think it captures a few important things: it says what the field does, as Sean pointed out; and it says what the default value is.

            Laurent Demailly

            yes I missed that part across multiple rev/copy paste/changes. fixing (there was the original text with mention of up/down keys, do we drop that? [it was on non exposed field so more a dev comment])

            ps: seems like [links] don't work in struct comments

            Laurent Demailly

            Done

            Gerrit-Comment-Date: Thu, 17 Apr 2025 17:17:30 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Laurent Demailly <ldem...@gmail.com>
            Comment-In-Reply-To: Austin Clements <aus...@google.com>
            Comment-In-Reply-To: Sean Liao <se...@liao.dev>
            unsatisfied_requirement
            open
            diffy

            Gerrit Bot (Gerrit)

            unread,
            Apr 17, 2025, 1:23:10 PMApr 17
            to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
            Attention needed from Austin Clements, Ian Lance Taylor and Sean Liao

            Gerrit Bot uploaded new patchset

            Gerrit Bot uploaded patch set #14 to this change.
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Austin Clements
            • Ian Lance Taylor
            • Sean Liao
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: newpatchset
            Gerrit-Project: term
            Gerrit-Branch: master
            Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
            Gerrit-Change-Number: 659835
            Gerrit-PatchSet: 14
            unsatisfied_requirement
            open
            diffy

            Laurent Demailly (Gerrit)

            unread,
            Apr 17, 2025, 1:29:08 PMApr 17
            to Gerrit Bot, goph...@pubsubhelper.golang.org, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Austin Clements, Ian Lance Taylor and Sean Liao

            Laurent Demailly added 3 comments

            Patchset-level comments
            File-level comment, Patchset 14 (Latest):
            Laurent Demailly . resolved

            ps: I don't know the protocol, is the original person supposed to be the one marking resolved after reviewing or... I mark it resolved when I think I addressed it and one reopens if there is an issue?

            File terminal.go
            Line 50, Patchset 13: // An implementation may decide to not add every lines by ignoring calls
            Austin Clements . resolved

            Isn't this last sentence redundant with the "It is allowed to drop any entry ..." sentence above?

            Laurent Demailly

            Thanks for the comments. I removed it and merged the 2. lmk (after you see the next rev)

            Laurent Demailly

            Done

            Line 485, Patchset 10: defer t.lock.Lock()
            Sean Liao . resolved

            locks seem unnecessary?

            Laurent Demailly

            it's very much necessary to _unlock_ so out can be used in History without deadlock

            Laurent Demailly

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Austin Clements
            • Ian Lance Taylor
            • Sean Liao
            Submit Requirements:
              • requirement is not satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: term
              Gerrit-Branch: master
              Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
              Gerrit-Change-Number: 659835
              Gerrit-PatchSet: 14
              Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
              Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
              Gerrit-CC: Austin Clements <aus...@google.com>
              Gerrit-CC: Gopher Robot <go...@golang.org>
              Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
              Gerrit-CC: Sean Liao <se...@liao.dev>
              Gerrit-Attention: Austin Clements <aus...@google.com>
              Gerrit-Attention: Sean Liao <se...@liao.dev>
              Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
              Gerrit-Comment-Date: Thu, 17 Apr 2025 17:29:04 +0000
              unsatisfied_requirement
              satisfied_requirement
              open
              diffy

              Gerrit Bot (Gerrit)

              unread,
              Apr 17, 2025, 1:30:21 PMApr 17
              to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
              Attention needed from Austin Clements, Ian Lance Taylor and Sean Liao

              Gerrit Bot uploaded new patchset

              Gerrit Bot uploaded patch set #15 to this change.
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Austin Clements
              • Ian Lance Taylor
              • Sean Liao
              Submit Requirements:
              • requirement is not satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: newpatchset
              Gerrit-Project: term
              Gerrit-Branch: master
              Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
              Gerrit-Change-Number: 659835
              Gerrit-PatchSet: 15
              unsatisfied_requirement
              satisfied_requirement
              open
              diffy

              Laurent Demailly (Gerrit)

              unread,
              Apr 17, 2025, 1:30:32 PMApr 17
              to Gerrit Bot, goph...@pubsubhelper.golang.org, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
              Attention needed from Austin Clements, Ian Lance Taylor and Sean Liao

              Laurent Demailly added 1 comment

              File terminal.go
              Line 46, Patchset 14: // Add adds will be called by [Terminal.ReadLine] to add
              Laurent Demailly . unresolved

              typo fixed in patchset 15 but gerrit lags a bit behind github

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Austin Clements
              • Ian Lance Taylor
              • Sean Liao
              Submit Requirements:
                • requirement is not satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • requirement is not satisfiedReview-Enforcement
                • requirement is not satisfiedTryBots-Pass
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: term
                Gerrit-Branch: master
                Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                Gerrit-Change-Number: 659835
                Gerrit-PatchSet: 14
                Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                Gerrit-CC: Austin Clements <aus...@google.com>
                Gerrit-CC: Gopher Robot <go...@golang.org>
                Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                Gerrit-CC: Sean Liao <se...@liao.dev>
                Gerrit-Attention: Austin Clements <aus...@google.com>
                Gerrit-Attention: Sean Liao <se...@liao.dev>
                Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                Gerrit-Comment-Date: Thu, 17 Apr 2025 17:30:28 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                unsatisfied_requirement
                open
                diffy

                Laurent Demailly (Gerrit)

                unread,
                Apr 17, 2025, 1:31:13 PMApr 17
                to Gerrit Bot, goph...@pubsubhelper.golang.org, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                Attention needed from Austin Clements, Ian Lance Taylor and Sean Liao

                Laurent Demailly added 1 comment

                File terminal.go
                Line 46, Patchset 14: // Add adds will be called by [Terminal.ReadLine] to add
                Laurent Demailly . resolved

                typo fixed in patchset 15 but gerrit lags a bit behind github

                Laurent Demailly

                Done

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Austin Clements
                • Ian Lance Taylor
                • Sean Liao
                Submit Requirements:
                  • requirement is not satisfiedCode-Review
                  • requirement satisfiedNo-Unresolved-Comments
                  • requirement is not satisfiedReview-Enforcement
                  • requirement is not satisfiedTryBots-Pass
                  Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                  Gerrit-MessageType: comment
                  Gerrit-Project: term
                  Gerrit-Branch: master
                  Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                  Gerrit-Change-Number: 659835
                  Gerrit-PatchSet: 15
                  Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                  Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                  Gerrit-CC: Austin Clements <aus...@google.com>
                  Gerrit-CC: Gopher Robot <go...@golang.org>
                  Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                  Gerrit-CC: Sean Liao <se...@liao.dev>
                  Gerrit-Attention: Austin Clements <aus...@google.com>
                  Gerrit-Attention: Sean Liao <se...@liao.dev>
                  Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                  Gerrit-Comment-Date: Thu, 17 Apr 2025 17:31:08 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Laurent Demailly <ldem...@gmail.com>
                  unsatisfied_requirement
                  satisfied_requirement
                  open
                  diffy

                  Austin Clements (Gerrit)

                  unread,
                  Apr 17, 2025, 2:26:22 PMApr 17
                  to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                  Attention needed from Ian Lance Taylor, Laurent Demailly and Sean Liao

                  Austin Clements voted and added 2 comments

                  Votes added by Austin Clements

                  Code-Review+2
                  Commit-Queue+1

                  2 comments

                  Patchset-level comments
                  Laurent Demailly . resolved

                  ps: I don't know the protocol, is the original person supposed to be the one marking resolved after reviewing or... I mark it resolved when I think I addressed it and one reopens if there is an issue?

                  Austin Clements

                  Yeah, you can go ahead and mark things resolved as you address them (unless you have a follow-up, of course).

                  File terminal.go
                  Line 115, Patchset 10: // History allows to replace the default implementation of the history
                  Sean Liao . resolved

                  Replacing is a secondary concern, it should document what this field does,
                  and the default value if left unset.

                  Austin Clements

                  In the proposal, the doc comment is:

                          // History records and retrieves lines of input read by [ReadLine].
                  //
                  // It is not safe to call ReadLine concurrently with any methods on History.
                  //
                  // [NewTerminal] sets this to an implementation that records the last 100 lines of input.

                  It certainly doesn't have to be this word for word, but I think it captures a few important things: it says what the field does, as Sean pointed out; and it says what the default value is.

                  Laurent Demailly

                  yes I missed that part across multiple rev/copy paste/changes. fixing (there was the original text with mention of up/down keys, do we drop that? [it was on non exposed field so more a dev comment])

                  ps: seems like [links] don't work in struct comments

                  Laurent Demailly

                  Done

                  Austin Clements

                  ps: seems like [links] don't work in struct comments

                  This is go.dev/issue/56004. Given how often we do this in the Go tree itself, I think this really is a bug and not working-as-intended.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Ian Lance Taylor
                  • Laurent Demailly
                  • Sean Liao
                  Submit Requirements:
                  • requirement satisfiedCode-Review
                  • requirement satisfiedNo-Unresolved-Comments
                  • requirement is not satisfiedReview-Enforcement
                  • requirement is not satisfiedTryBots-Pass
                  Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                  Gerrit-MessageType: comment
                  Gerrit-Project: term
                  Gerrit-Branch: master
                  Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                  Gerrit-Change-Number: 659835
                  Gerrit-PatchSet: 15
                  Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                  Gerrit-Reviewer: Austin Clements <aus...@google.com>
                  Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                  Gerrit-CC: Gopher Robot <go...@golang.org>
                  Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                  Gerrit-CC: Sean Liao <se...@liao.dev>
                  Gerrit-Attention: Laurent Demailly <ldem...@gmail.com>
                  Gerrit-Attention: Sean Liao <se...@liao.dev>
                  Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                  Gerrit-Comment-Date: Thu, 17 Apr 2025 18:26:17 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Gerrit Bot (Gerrit)

                  unread,
                  Apr 17, 2025, 3:31:47 PMApr 17
                  to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
                  Attention needed from Austin Clements, Ian Lance Taylor, Laurent Demailly and Sean Liao

                  Gerrit Bot uploaded new patchset

                  Gerrit Bot uploaded patch set #16 to this change.
                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Austin Clements
                  • Ian Lance Taylor
                  • Laurent Demailly
                  • Sean Liao
                    Submit Requirements:
                      • requirement satisfiedCode-Review
                      • requirement satisfiedNo-Unresolved-Comments
                      • requirement is not satisfiedReview-Enforcement
                      • requirement satisfiedTryBots-Pass
                      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                      Gerrit-MessageType: newpatchset
                      Gerrit-Project: term
                      Gerrit-Branch: master
                      Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                      Gerrit-Change-Number: 659835
                      Gerrit-PatchSet: 16
                      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                      Gerrit-Reviewer: Austin Clements <aus...@google.com>
                      Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                      Gerrit-CC: Gopher Robot <go...@golang.org>
                      Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                      Gerrit-CC: Sean Liao <se...@liao.dev>
                      Gerrit-Attention: Austin Clements <aus...@google.com>
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Gerrit Bot (Gerrit)

                      unread,
                      Apr 17, 2025, 10:57:17 PMApr 17
                      to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
                      Attention needed from Austin Clements, Ian Lance Taylor and Sean Liao

                      Gerrit Bot uploaded new patchset

                      Gerrit Bot uploaded patch set #17 to this change.
                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Austin Clements
                      • Ian Lance Taylor
                      • Sean Liao
                      Submit Requirements:
                      • requirement satisfiedCode-Review
                      • requirement satisfiedNo-Unresolved-Comments
                      • requirement is not satisfiedReview-Enforcement
                      • requirement satisfiedTryBots-Pass
                      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                      Gerrit-MessageType: newpatchset
                      Gerrit-Project: term
                      Gerrit-Branch: master
                      Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                      Gerrit-Change-Number: 659835
                      Gerrit-PatchSet: 17
                      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                      Gerrit-Reviewer: Austin Clements <aus...@google.com>
                      Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                      Gerrit-CC: Gopher Robot <go...@golang.org>
                      Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                      Gerrit-CC: Sean Liao <se...@liao.dev>
                      Gerrit-Attention: Austin Clements <aus...@google.com>
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Michael Pratt (Gerrit)

                      unread,
                      Apr 18, 2025, 7:22:33 AMApr 18
                      to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Michael Pratt, Go LUCI, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                      Attention needed from Austin Clements and Ian Lance Taylor

                      Michael Pratt voted Code-Review+1

                      Code-Review+1
                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Austin Clements
                      • Ian Lance Taylor
                      Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 17
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Austin Clements <aus...@google.com>
                        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Comment-Date: Fri, 18 Apr 2025 11:22:26 +0000
                        Gerrit-HasComments: No
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        open
                        diffy

                        Jorropo (Gerrit)

                        unread,
                        Apr 18, 2025, 10:44:29 AMApr 18
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Michael Pratt, Go LUCI, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements and Ian Lance Taylor

                        Jorropo added 2 comments

                        File terminal.go
                        Line 42, Patchset 17 (Latest):// The default implementation of History provides a simple ring buffer limited
                        Jorropo . unresolved

                        What default implementation ? Who uses this ?

                        This paragraph would better fit next to the struct field:
                        ```
                        History History
                        ```

                        Line 485, Patchset 17 (Latest): t.lock.Unlock() // Unlock to avoid deadlock if History methods use the output writer.
                        Jorropo . unresolved

                        It looks like calling `(*Terminal).ReadLines` concurrently used to be safe, while now this will cause very interesting bugs.

                        Is that ok ? I guess few pieces of code do this to begin with.

                        If breaking this is not ok we can keep this behavior while allowing reentrency on the output write by using two mutexes.

                        If breaking this is ok then please add something similar to `t.someUselessField = someUselessValue` before the critical sections of methods transitively calling `historyAt` and `historyAdd`, this will make them trip the race detector if called concurrently.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Austin Clements
                        • Ian Lance Taylor
                        Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement is not satisfiedNo-Unresolved-Comments
                        • requirement satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 17
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Jorropo <jorro...@gmail.com>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Austin Clements <aus...@google.com>
                        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Comment-Date: Fri, 18 Apr 2025 14:44:22 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Jorropo (Gerrit)

                        unread,
                        Apr 18, 2025, 10:49:10 AMApr 18
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Michael Pratt, Go LUCI, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements and Ian Lance Taylor

                        Jorropo added 1 comment

                        File terminal.go
                        Line 485, Patchset 17 (Latest): t.lock.Unlock() // Unlock to avoid deadlock if History methods use the output writer.
                        Jorropo . unresolved

                        It looks like calling `(*Terminal).ReadLines` concurrently used to be safe, while now this will cause very interesting bugs.

                        Is that ok ? I guess few pieces of code do this to begin with.

                        If breaking this is not ok we can keep this behavior while allowing reentrency on the output write by using two mutexes.

                        If breaking this is ok then please add something similar to `t.someUselessField = someUselessValue` before the critical sections of methods transitively calling `historyAt` and `historyAdd`, this will make them trip the race detector if called concurrently.

                        Jorropo

                        Actually for the breaking this is ok case, similar to what I've said above you could add an unprotected read in front of all `t.lock.Lock()` and an unprotected write in after all `t.lock.Unlock()` in `historyAt` and `historyAdd` but this will avoid some false trips if `historyAt` and `historyAdd` are not ran.

                        Gerrit-Comment-Date: Fri, 18 Apr 2025 14:49:04 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        Comment-In-Reply-To: Jorropo <jorro...@gmail.com>
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Jorropo (Gerrit)

                        unread,
                        Apr 18, 2025, 10:52:14 AMApr 18
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Michael Pratt, Go LUCI, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements and Ian Lance Taylor

                        Jorropo added 1 comment

                        File terminal.go
                        Line 485, Patchset 17 (Latest): t.lock.Unlock() // Unlock to avoid deadlock if History methods use the output writer.
                        Jorropo . unresolved

                        It looks like calling `(*Terminal).ReadLines` concurrently used to be safe, while now this will cause very interesting bugs.

                        Is that ok ? I guess few pieces of code do this to begin with.

                        If breaking this is not ok we can keep this behavior while allowing reentrency on the output write by using two mutexes.

                        If breaking this is ok then please add something similar to `t.someUselessField = someUselessValue` before the critical sections of methods transitively calling `historyAt` and `historyAdd`, this will make them trip the race detector if called concurrently.

                        Jorropo

                        Actually for the breaking this is ok case, similar to what I've said above you could add an unprotected read in front of all `t.lock.Lock()` and an unprotected write in after all `t.lock.Unlock()` in `historyAt` and `historyAdd` but this will avoid some false trips if `historyAt` and `historyAdd` are not ran.

                        Jorropo

                        *unprotected read in front of `t.lock.Lock()` in methods transitively calling `historyAt` & `historyAdd`, not all of them

                        Gerrit-Comment-Date: Fri, 18 Apr 2025 14:52:07 +0000
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Laurent Demailly (Gerrit)

                        unread,
                        Apr 18, 2025, 1:21:29 PMApr 18
                        to Gerrit Bot, goph...@pubsubhelper.golang.org, Jorropo, Michael Pratt, Go LUCI, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements and Ian Lance Taylor

                        Laurent Demailly added 3 comments

                        Patchset-level comments
                        File-level comment, Patchset 17 (Latest):
                        Laurent Demailly . resolved

                        Thanks a lot for your time and comments YC

                        File terminal.go
                        Line 42, Patchset 17 (Latest):// The default implementation of History provides a simple ring buffer limited
                        Jorropo . unresolved

                        What default implementation ? Who uses this ?

                        This paragraph would better fit next to the struct field:
                        ```
                        History History
                        ```

                        Laurent Demailly

                        given in the godoc History shows up before Terminal it doesn't hurt to (repeat) what it is for?

                        Line 485, Patchset 17 (Latest): t.lock.Unlock() // Unlock to avoid deadlock if History methods use the output writer.
                        Jorropo . unresolved

                        It looks like calling `(*Terminal).ReadLines` concurrently used to be safe, while now this will cause very interesting bugs.

                        Is that ok ? I guess few pieces of code do this to begin with.

                        If breaking this is not ok we can keep this behavior while allowing reentrency on the output write by using two mutexes.

                        If breaking this is ok then please add something similar to `t.someUselessField = someUselessValue` before the critical sections of methods transitively calling `historyAt` and `historyAdd`, this will make them trip the race detector if called concurrently.

                        Jorropo

                        Actually for the breaking this is ok case, similar to what I've said above you could add an unprotected read in front of all `t.lock.Lock()` and an unprotected write in after all `t.lock.Unlock()` in `historyAt` and `historyAdd` but this will avoid some false trips if `historyAt` and `historyAdd` are not ran.

                        Jorropo

                        *unprotected read in front of `t.lock.Lock()` in methods transitively calling `historyAt` & `historyAdd`, not all of them

                        Laurent Demailly

                        You're right and as mentioned during the proposal lengthy discussion an interface callback in the middle for what was properly locked in all cases before opens up potential issues. It was deemed that documenting "don't do this" was enough but let me see if we can do better that that (in addition to preserving the ability to call concurrent Write which is my understanding of the main feature of Terminal)

                        Gerrit-Comment-Date: Fri, 18 Apr 2025 17:21:25 +0000
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Laurent Demailly (Gerrit)

                        unread,
                        Apr 18, 2025, 1:36:55 PMApr 18
                        to Gerrit Bot, goph...@pubsubhelper.golang.org, Jorropo, Michael Pratt, Go LUCI, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements and Ian Lance Taylor

                        Laurent Demailly added 2 comments

                        File terminal.go
                        Line 485, Patchset 17 (Latest): t.lock.Unlock() // Unlock to avoid deadlock if History methods use the output writer.
                        Jorropo . unresolved

                        It looks like calling `(*Terminal).ReadLines` concurrently used to be safe, while now this will cause very interesting bugs.

                        Is that ok ? I guess few pieces of code do this to begin with.

                        If breaking this is not ok we can keep this behavior while allowing reentrency on the output write by using two mutexes.

                        If breaking this is ok then please add something similar to `t.someUselessField = someUselessValue` before the critical sections of methods transitively calling `historyAt` and `historyAdd`, this will make them trip the race detector if called concurrently.

                        Jorropo

                        Actually for the breaking this is ok case, similar to what I've said above you could add an unprotected read in front of all `t.lock.Lock()` and an unprotected write in after all `t.lock.Unlock()` in `historyAt` and `historyAdd` but this will avoid some false trips if `historyAt` and `historyAdd` are not ran.

                        Jorropo

                        *unprotected read in front of `t.lock.Lock()` in methods transitively calling `historyAt` & `historyAdd`, not all of them

                        Laurent Demailly

                        You're right and as mentioned during the proposal lengthy discussion an interface callback in the middle for what was properly locked in all cases before opens up potential issues. It was deemed that documenting "don't do this" was enough but let me see if we can do better that that (in addition to preserving the ability to call concurrent Write which is my understanding of the main feature of Terminal)

                        Laurent Demailly

                        Looking again at the code I found what I had noticed but forgot in the months since; unlocking mid way inside ReadLine is not new:

                        ```go
                        t.lock.Unlock()
                        n, err = t.c.Read(readBuf)
                        t.lock.Lock()
                        ```
                        (putting a comment on that line too)
                        Line 844, Patchset 17 (Latest): t.lock.Unlock()
                        Laurent Demailly . unresolved

                        see here

                        Gerrit-Comment-Date: Fri, 18 Apr 2025 17:36:51 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        Comment-In-Reply-To: Laurent Demailly <ldem...@gmail.com>
                        Comment-In-Reply-To: Jorropo <jorro...@gmail.com>
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Jorropo (Gerrit)

                        unread,
                        Apr 18, 2025, 2:32:40 PMApr 18
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Michael Pratt, Go LUCI, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements, Ian Lance Taylor and Laurent Demailly

                        Jorropo added 3 comments

                        File terminal.go
                        Line 42, Patchset 17 (Latest):// The default implementation of History provides a simple ring buffer limited
                        Jorropo . unresolved

                        What default implementation ? Who uses this ?

                        This paragraph would better fit next to the struct field:
                        ```
                        History History
                        ```

                        Laurent Demailly

                        given in the godoc History shows up before Terminal it doesn't hurt to (repeat) what it is for?

                        Jorropo

                        See https://pkg.go.dev/net/http#RoundTripper for example, it has no default implementation paragraph.

                        Instead https://pkg.go.dev/net/http#Client.Transport mentions the default impl.

                        Line 485, Patchset 17 (Latest): t.lock.Unlock() // Unlock to avoid deadlock if History methods use the output writer.
                        Jorropo . resolved

                        It looks like calling `(*Terminal).ReadLines` concurrently used to be safe, while now this will cause very interesting bugs.

                        Is that ok ? I guess few pieces of code do this to begin with.

                        If breaking this is not ok we can keep this behavior while allowing reentrency on the output write by using two mutexes.

                        If breaking this is ok then please add something similar to `t.someUselessField = someUselessValue` before the critical sections of methods transitively calling `historyAt` and `historyAdd`, this will make them trip the race detector if called concurrently.

                        Jorropo

                        Actually for the breaking this is ok case, similar to what I've said above you could add an unprotected read in front of all `t.lock.Lock()` and an unprotected write in after all `t.lock.Unlock()` in `historyAt` and `historyAdd` but this will avoid some false trips if `historyAt` and `historyAdd` are not ran.

                        Jorropo

                        *unprotected read in front of `t.lock.Lock()` in methods transitively calling `historyAt` & `historyAdd`, not all of them

                        Laurent Demailly

                        You're right and as mentioned during the proposal lengthy discussion an interface callback in the middle for what was properly locked in all cases before opens up potential issues. It was deemed that documenting "don't do this" was enough but let me see if we can do better that that (in addition to preserving the ability to call concurrent Write which is my understanding of the main feature of Terminal)

                        Laurent Demailly

                        Looking again at the code I found what I had noticed but forgot in the months since; unlocking mid way inside ReadLine is not new:

                        ```go
                        t.lock.Unlock()
                        n, err = t.c.Read(readBuf)
                        t.lock.Lock()
                        ```
                        (putting a comment on that line too)
                        Jorropo

                        Acknowledged

                        Laurent Demailly . resolved

                        see here

                        Jorropo

                        Acknowledged

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Austin Clements
                        • Ian Lance Taylor
                        • Laurent Demailly
                        Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement is not satisfiedNo-Unresolved-Comments
                        • requirement satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 17
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Jorropo <jorro...@gmail.com>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-Attention: Austin Clements <aus...@google.com>
                        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Comment-Date: Fri, 18 Apr 2025 18:32:32 +0000
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Laurent Demailly (Gerrit)

                        unread,
                        Apr 18, 2025, 2:44:07 PMApr 18
                        to Gerrit Bot, goph...@pubsubhelper.golang.org, Jorropo, Michael Pratt, Go LUCI, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements, Ian Lance Taylor and Jorropo

                        Laurent Demailly added 2 comments

                        Patchset-level comments
                        Laurent Demailly . resolved

                        Removed the default impl. details from History interface.

                        File terminal.go
                        Line 42, Patchset 17 (Latest):// The default implementation of History provides a simple ring buffer limited
                        Jorropo . resolved

                        What default implementation ? Who uses this ?

                        This paragraph would better fit next to the struct field:
                        ```
                        History History
                        ```

                        Laurent Demailly

                        given in the godoc History shows up before Terminal it doesn't hurt to (repeat) what it is for?

                        Jorropo

                        See https://pkg.go.dev/net/http#RoundTripper for example, it has no default implementation paragraph.

                        Instead https://pkg.go.dev/net/http#Client.Transport mentions the default impl.

                        Laurent Demailly

                        Done

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Austin Clements
                        • Ian Lance Taylor
                        • Jorropo
                        Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 17
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Jorropo <jorro...@gmail.com>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Austin Clements <aus...@google.com>
                        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Attention: Jorropo <jorro...@gmail.com>
                        Gerrit-Comment-Date: Fri, 18 Apr 2025 18:44:03 +0000
                        satisfied_requirement
                        open
                        diffy

                        Gerrit Bot (Gerrit)

                        unread,
                        Apr 18, 2025, 2:46:29 PMApr 18
                        to Laurent Demailly, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
                        Attention needed from Austin Clements, Ian Lance Taylor, Jorropo and Michael Pratt

                        Gerrit Bot uploaded new patchset

                        Gerrit Bot uploaded patch set #18 to this change.
                        Following approvals got outdated and were removed:
                        • Code-Review: +1 by Michael Pratt, +2 by Austin Clements
                        • TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Austin Clements
                        • Ian Lance Taylor
                        • Jorropo
                        • Michael Pratt
                        Submit Requirements:
                        • requirement is not satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement is not satisfiedReview-Enforcement
                        • requirement is not satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: newpatchset
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 18
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Jorropo <jorro...@gmail.com>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Austin Clements <aus...@google.com>
                        Gerrit-Attention: Michael Pratt <mpr...@google.com>
                        unsatisfied_requirement
                        satisfied_requirement
                        open
                        diffy

                        Jorropo (Gerrit)

                        unread,
                        Apr 18, 2025, 2:48:53 PMApr 18
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Michael Pratt, Go LUCI, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements, Ian Lance Taylor and Michael Pratt

                        Jorropo voted Commit-Queue+1

                        Commit-Queue+1
                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Austin Clements
                        • Ian Lance Taylor
                        • Michael Pratt
                        Submit Requirements:
                        • requirement is not satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement is not satisfiedReview-Enforcement
                        • requirement is not satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 18
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Austin Clements <aus...@google.com>
                        Gerrit-Attention: Michael Pratt <mpr...@google.com>
                        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Comment-Date: Fri, 18 Apr 2025 18:48:46 +0000
                        Gerrit-HasComments: No
                        Gerrit-Has-Labels: Yes
                        unsatisfied_requirement
                        satisfied_requirement
                        open
                        diffy

                        Jorropo (Gerrit)

                        unread,
                        Apr 18, 2025, 2:51:33 PMApr 18
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Go LUCI, Michael Pratt, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements, Ian Lance Taylor and Michael Pratt

                        Jorropo voted

                        Auto-Submit+1
                        Code-Review+2
                        Commit-Queue+1
                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Austin Clements
                        • Ian Lance Taylor
                        • Michael Pratt
                        Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement is not satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 18
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Austin Clements <aus...@google.com>
                        Gerrit-Attention: Michael Pratt <mpr...@google.com>
                        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Comment-Date: Fri, 18 Apr 2025 18:51:26 +0000
                        Gerrit-HasComments: No
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Jorropo (Gerrit)

                        unread,
                        Apr 18, 2025, 2:52:11 PMApr 18
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Go LUCI, Michael Pratt, Austin Clements, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Austin Clements, Ian Lance Taylor and Michael Pratt

                        Jorropo voted Code-Review+1

                        Code-Review+1
                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Austin Clements
                        • Ian Lance Taylor
                        • Michael Pratt
                        Submit Requirements:
                        • requirement is not satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement is not satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 18
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Austin Clements <aus...@google.com>
                        Gerrit-Attention: Michael Pratt <mpr...@google.com>
                        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Comment-Date: Fri, 18 Apr 2025 18:52:02 +0000
                        Gerrit-HasComments: No
                        Gerrit-Has-Labels: Yes
                        unsatisfied_requirement
                        satisfied_requirement
                        open
                        diffy

                        Austin Clements (Gerrit)

                        unread,
                        Apr 21, 2025, 1:43:40 PMApr 21
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Austin Clements, Jorropo, Go LUCI, Michael Pratt, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Ian Lance Taylor and Michael Pratt

                        Austin Clements voted Code-Review+2

                        Code-Review+2
                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Ian Lance Taylor
                        • Michael Pratt
                        Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement is not satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 18
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Michael Pratt <mpr...@google.com>
                        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Comment-Date: Mon, 21 Apr 2025 17:43:37 +0000
                        Gerrit-HasComments: No
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Michael Pratt (Gerrit)

                        unread,
                        Apr 21, 2025, 3:18:24 PMApr 21
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Michael Pratt, Austin Clements, Jorropo, Go LUCI, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Ian Lance Taylor

                        Michael Pratt voted Commit-Queue+1

                        Commit-Queue+1
                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Ian Lance Taylor
                        Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement is not satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: term
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                        Gerrit-Change-Number: 659835
                        Gerrit-PatchSet: 18
                        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                        Gerrit-Reviewer: Austin Clements <aus...@google.com>
                        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
                        Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                        Gerrit-CC: Gopher Robot <go...@golang.org>
                        Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                        Gerrit-CC: Sean Liao <se...@liao.dev>
                        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                        Gerrit-Comment-Date: Mon, 21 Apr 2025 19:18:18 +0000
                        Gerrit-HasComments: No
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Michael Pratt (Gerrit)

                        unread,
                        Apr 21, 2025, 3:30:50 PMApr 21
                        to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, Michael Pratt, Austin Clements, Jorropo, Go LUCI, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
                        Attention needed from Ian Lance Taylor

                        Michael Pratt voted Code-Review+1

                        Code-Review+1
                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Ian Lance Taylor
                        Submit Requirements:
                          • requirement satisfiedCode-Review
                          • requirement satisfiedNo-Unresolved-Comments
                          • requirement satisfiedReview-Enforcement
                          • requirement satisfiedTryBots-Pass
                          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                          Gerrit-MessageType: comment
                          Gerrit-Project: term
                          Gerrit-Branch: master
                          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                          Gerrit-Change-Number: 659835
                          Gerrit-PatchSet: 18
                          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                          Gerrit-Reviewer: Austin Clements <aus...@google.com>
                          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                          Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
                          Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                          Gerrit-CC: Gopher Robot <go...@golang.org>
                          Gerrit-CC: Laurent Demailly <ldem...@gmail.com>
                          Gerrit-CC: Sean Liao <se...@liao.dev>
                          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
                          Gerrit-Comment-Date: Mon, 21 Apr 2025 19:30:42 +0000
                          Gerrit-HasComments: No
                          Gerrit-Has-Labels: Yes
                          satisfied_requirement
                          open
                          diffy

                          Gopher Robot (Gerrit)

                          unread,
                          Apr 21, 2025, 3:31:01 PMApr 21
                          to Gerrit Bot, Laurent Demailly, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Michael Pratt, Austin Clements, Jorropo, Go LUCI, Ian Lance Taylor, golang-co...@googlegroups.com

                          Gopher Robot submitted the change

                          Change information

                          Commit message:
                          term: support pluggable history

                          Expose a new History interface that allows replacement of the default
                          ring buffer to customize what gets added or not; as well as to allow
                          saving/restoring history on either the default ringbuffer or a custom
                          replacement.

                          Fixes golang/go#68780
                          Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                          GitHub-Last-Rev: 621281355fd577da77f135c4e15552eba3ead584
                          GitHub-Pull-Request: golang/term#20
                          Reviewed-by: Michael Pratt <mpr...@google.com>
                          Auto-Submit: Jorropo <jorro...@gmail.com>
                          Reviewed-by: Jorropo <jorro...@gmail.com>
                          Reviewed-by: Austin Clements <aus...@google.com>
                          Files:
                          • M terminal.go
                          Change size: M
                          Delta: 1 file changed, 58 insertions(+), 10 deletions(-)
                          Branch: refs/heads/master
                          Submit Requirements:
                          • requirement satisfiedCode-Review: +1 by Michael Pratt, +2 by Austin Clements, +1 by Jorropo
                          • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
                          Open in Gerrit
                          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                          Gerrit-MessageType: merged
                          Gerrit-Project: term
                          Gerrit-Branch: master
                          Gerrit-Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
                          Gerrit-Change-Number: 659835
                          Gerrit-PatchSet: 19
                          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                          Gerrit-Reviewer: Austin Clements <aus...@google.com>
                          Gerrit-Reviewer: Gopher Robot <go...@golang.org>
                          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
                          Gerrit-Reviewer: Jorropo <jorro...@gmail.com>
                          Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                          open
                          diffy
                          satisfied_requirement
                          Reply all
                          Reply to author
                          Forward
                          0 new messages