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

fix: use stdout for packager logging #6072

Merged
merged 3 commits into from
Jun 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions main/src/ca/uwaterloo/flix/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ object Main {
}

case Command.Init =>
Bootstrap.init(cwd, options)(System.out) match {
Bootstrap.init(cwd, options)(System.err) match {
case Validation.Success(_) =>
System.exit(0)
case failure =>
Expand All @@ -153,7 +153,7 @@ object Main {
}

case Command.Check =>
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.out)) {
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.err)) {
bootstrap => bootstrap.check(options)
} match {
case Validation.Success(_) => System.exit(0)
Expand All @@ -163,7 +163,7 @@ object Main {
}

case Command.Build =>
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.out)) {
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.err)) {
bootstrap =>
implicit val flix: Flix = new Flix().setFormatter(formatter)
bootstrap.build(loadClasses = false)
Expand All @@ -175,7 +175,7 @@ object Main {
}

case Command.BuildJar =>
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.out)) {
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.err)) {
bootstrap => bootstrap.buildJar(options)
} match {
case Validation.Success(_) =>
Expand All @@ -186,7 +186,7 @@ object Main {
}

case Command.BuildPkg =>
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.out)) {
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.err)) {
bootstrap => bootstrap.buildPkg(options)
} match {
case Validation.Success(_) =>
Expand All @@ -197,7 +197,7 @@ object Main {
}

case Command.Run =>
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.out)) {
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.err)) {
bootstrap =>
val args: Array[String] = cmdOpts.args match {
case None => Array.empty
Expand All @@ -214,7 +214,7 @@ object Main {

case Command.Benchmark =>
val o = options.copy(progress = false)
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.out)) {
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.err)) {
bootstrap => bootstrap.benchmark(o)
} match {
case Validation.Success(_) =>
Expand All @@ -226,7 +226,7 @@ object Main {

case Command.Test =>
val o = options.copy(progress = false)
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.out)) {
flatMapN(Bootstrap.bootstrap(cwd, options.githubKey)(System.err)) {
bootstrap => bootstrap.test(o)
} match {
case Validation.Success(_) =>
Expand All @@ -241,7 +241,7 @@ object Main {
println("The 'repl' command cannot be used with a list of files.")
System.exit(1)
}
Bootstrap.bootstrap(cwd, options.githubKey)(System.out) match {
Bootstrap.bootstrap(cwd, options.githubKey)(System.err) match {
case Validation.Success(bootstrap) =>
val shell = new Shell(bootstrap, options)
shell.loop()
Expand Down