Skip to content

Transcript: Introduce API agnostic to internal line return - #1545

Merged
jecisc merged 2 commits into
pharo-spec:Pharo15from
jecisc:newline
Nov 5, 2026
Merged

jecisc merged 2 commits into
pharo-spec:Pharo15from
jecisc:newline

Conversation

@jecisc

@jecisc jecisc commented Oct 7, 2026

Copy link
Copy Markdown
Member

Requires: pharo-project/pharo#20078

Introduce an API independant to line ending. The goal is to have only one place in Pharo where we chose the internal line ending. The user does not need to care if the transcript uses cr, lf, crlf...

Requires: pharo-project/pharo#20078

Introduce an API independant to line ending. The goal is to have only one place in Pharo where we chose the internal line ending. The user does not need to care if the transcript uses cr, lf, crlf...
@jecisc jecisc changed the title Trascript: Introduce API agnostic to internal line return Transcript: Introduce API agnostic to internal line return Oct 8, 2026
@jecisc jecisc closed this Oct 14, 2026
@jecisc jecisc reopened this Oct 14, 2026

@Gabriel-Darbord Gabriel-Darbord left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, I think it's good to start moving past cr which is really just historical baggage :)

{ #category : 'streaming' }
StThreadSafeTranscript >> cr [
"Output a cr on the receiver"
"To deprecate in favor of #newLine"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure this should be deprecated, if we want to use cr explicitly then that seems fine.
What would need deprecation are all the methods using cr when they really mean newLine as you've done elsewhere.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I deprecated it because this is the transcript and not a stream. Do you often need to print explicitly a cr and not a lf/crlf in a transcript?

I think that without rewriting, people will keep the #cr and we will have one place in the system with still crs

But if you really think it might make sense to keep it, I can update the PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK that makes sense to me, not much point keeping cr on the transcript.

@jecisc
jecisc merged commit 9b20491 into pharo-spec:Pharo15 Nov 5, 2026
1 of 2 checks passed
@jecisc
jecisc deleted the newline branch November 5, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants