Skip to content

Conversation

@xuwei-k
Copy link
Contributor

@xuwei-k xuwei-k commented Nov 30, 2025

No description provided.

@xuwei-k xuwei-k requested a review from a team as a code owner November 30, 2025 07:06
@som-snytt
Copy link
Contributor

som-snytt commented Nov 30, 2025

I wonder if there is a plan for migrating library unit tests.

I don't know what this output format is supposed to be, but usually for dynamic width I would construct the format string.

In this example with newlines added, the col is 5 and is the width of the caret field.

scala> "%s:%d:%d: %s\n%s\n%s^".format(descr, line, col, msg, lineNum(line), spaces(col - 1))
val res3: String = descr:10:5: message
hello, world
    ^

scala> "%s:%d:%d: %s\n%s\n%5s".format(descr, line, col, msg, lineNum(line), "^")
val res4: String = descr:10:5: message
hello, world
    ^

scala> s"%s:%d:%d: %s\n%s\n%${col}s".format(descr, line, col, msg, lineNum(line), "^")
val res5: String = descr:10:5: message
hello, world
    ^

Edit: I don't know if there is a plan for deprecating stuff that they were talking about deprecating a long time ago.

Edit: this particular change may be either fine or irrelevant, but it would be nice to address testing and/or deprecation. The previous edit to this line caused an off-by-one in the line number; that was in 2010.

@xuwei-k xuwei-k force-pushed the String-repeat-scala-io-Source branch from baba32a to da3fb9a Compare December 1, 2025 08:10
@Gedochao
Copy link
Contributor

Gedochao commented Dec 1, 2025

I wonder if there is a plan for migrating library unit tests.

cc @hamzaremmal

@hamzaremmal
Copy link
Member

I wonder if there is a plan for migrating library unit tests.

cc @hamzaremmal

There are plans but I have limited time. One step at a time.

@hamzaremmal hamzaremmal merged commit f9aed5a into scala:main Dec 1, 2025
46 checks passed
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.

4 participants