Skip to content
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

Use system calls to get terminal size on Linux / Mac #4497

Open
wants to merge 28 commits into
base: 0.12.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3548d0a
Use system calls to get terminal size on Linux / Mac
alexarchambault Feb 6, 2025
3932da7
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 6, 2025
068a0f7
Load jansi native lib ourselves to speed things up
alexarchambault Feb 7, 2025
baea11d
Merge branch '0.12.x' into native-terminal
alexarchambault Feb 17, 2025
e033ef5
Fix coursier interface version
alexarchambault Feb 17, 2025
253cb6b
Fix
alexarchambault Feb 17, 2025
39f2c86
Add missing coursier codecs
alexarchambault Feb 17, 2025
f2fe2d1
Merge branch '0.12.x' into native-terminal
alexarchambault Feb 28, 2025
383cac1
Tweaking
alexarchambault Feb 28, 2025
c2a21c1
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 28, 2025
ab5829f
Merge branch '0.12.x' into pr/native-terminal
alexarchambault Mar 11, 2025
9a85417
Merge branch '0.12.x' into pr/native-terminal
alexarchambault Mar 12, 2025
c4e8887
Add comments
alexarchambault Mar 12, 2025
302387c
Merge branch '0.12.x' into pr/native-terminal
alexarchambault Mar 13, 2025
1d9cb82
Don't publish jansi in ~/.ivy2/local in integration test
alexarchambault Mar 13, 2025
9ee14f7
Merge branch '0.12.x' into pr/native-terminal
alexarchambault Mar 13, 2025
54b6843
Merge branch '0.12.x' into pr/native-terminal
alexarchambault Mar 14, 2025
16e17be
Merge branch '0.12.x' into pr/native-terminal
alexarchambault Mar 25, 2025
c3625e6
debug
alexarchambault Mar 25, 2025
ee96932
debug
alexarchambault Mar 26, 2025
c525f4a
Adjust logback outfile file upon startup
alexarchambault Mar 26, 2025
ba089f6
debug
alexarchambault Mar 26, 2025
813a8b6
fixup Adjust logback outfile file upon startup
alexarchambault Mar 26, 2025
b80a92d
Merge branch '0.12.x' into pr/native-terminal
alexarchambault Mar 26, 2025
439a9c1
Revert debug stuff
alexarchambault Mar 26, 2025
ad391e1
Make fast path / slow path more explicit
alexarchambault Mar 26, 2025
6802c56
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 26, 2025
bf507e4
debug CI
alexarchambault Mar 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust logback outfile file upon startup
  • Loading branch information
alexarchambault committed Mar 26, 2025
commit c525f4a50219bc2561acfea91dd2f8741fd50a81
2 changes: 1 addition & 1 deletion runner/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<configuration debug="false" scan="false">
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>out/mill.log</file>
<file>${mill.log.file:-out/mill.log}</file>
<encoder>
<pattern>%date %level [%thread] %logger{36} %msg%n</pattern>
</encoder>
Expand Down
5 changes: 5 additions & 0 deletions runner/src/mill/runner/MillMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ object MillMain {
}

def main(args: Array[String]): Unit = SystemStreams.withTopLevelSystemStreamProxy {
adjustLogbackOutputFile()
val initialSystemStreams = SystemStreams.original
// setup streams
val (runnerStreams, cleanupStreams, bspLog) =
Expand Down Expand Up @@ -436,6 +437,10 @@ object MillMain {
for ((k, v) <- desiredProps) System.setProperty(k, v)
}

def adjustLogbackOutputFile(): Unit =
if (!sys.props.contains("mill.log.file"))
sys.props("mill.log.file") = s"${OutFiles.out}/mill.log"

def withOutLock[T](
noBuildLock: Boolean,
noWaitForBuildLock: Boolean,
Expand Down
2 changes: 2 additions & 0 deletions runner/src/mill/runner/MillServerMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ object MillServerMain {
}
)

MillMain.adjustLogbackOutputFile()

val acceptTimeoutMillis =
Try(System.getProperty("mill.server_timeout").toInt).getOrElse(30 * 60 * 1000) // 30 minutes

Expand Down