-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text.to_display_text is (shortened) identity #6174
Conversation
...me/src/main/java/org/enso/interpreter/node/expression/builtin/text/AnyToDisplayTextNode.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -32,6 +35,22 @@ Text showExceptions( | |||
} | |||
} | |||
|
|||
@Specialization | |||
Text convertText(Text self) { | |||
final var limit = 80; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't that be lifted to a (private static final
) constant ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally the limit
was only used locally in a single method. Then I had to move the iterator manipulation behind @TruffleBoundary
...
if (self.length() < limit) { | ||
return self; | ||
} else { | ||
return takePrefix(self, limit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we an ellipsis here …
(U+2026)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good idea indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we an ellipsis here
"should we add an ellipsis?" is the question?
* develop: Project Sharing (#6077) Adjust `{Table|Column}.parse` to use `Value_Type` (#6213) Add cloud endpoints for frontend (#6002) Implement `Table.union` for Database backend (#6204) Batch insert suggestions (#6189) Formatter fix to not fail when encountering an invalid symlink. (#6172) Suspended atom fields are evaluated only once (#6151) Text.to_display_text is (shortened) identity (#6174) Engine benchmark visualization tool can compare two bench runs (#6198) Add PRIVATE so function hidden from Component Browser and other tidying... (#6207) Hotfix for #6203. (#6210)
Pull Request Description
Fixes #5971.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Java,
style guides.