less noisy output about what module files are being imported.

This commit is contained in:
Irmen de Jong 2022-02-05 04:25:34 +01:00
parent 30e1c3307c
commit b35abd548c
2 changed files with 5 additions and 6 deletions

View File

@ -62,6 +62,7 @@ fun compileProgram(args: CompilerArguments): CompilationResult {
val totalTime = measureTimeMillis {
// import main module and everything it needs
val (programresult, compilationOptions, imported) = parseImports(args.filepath, args.errors, compTarget, args.sourceDirs)
println("${args.filepath} parsed.\u001B[0K")
with(compilationOptions) {
slowCodegenWarnings = args.slowCodegenWarnings
optimize = args.optimize
@ -266,7 +267,7 @@ fun determineCompilationOptions(program: Program, compTarget: ICompilationTarget
private fun processAst(program: Program, errors: IErrorReporter, compilerOptions: CompilationOptions) {
// perform initial syntax checks and processings
println("Processing for target ${compilerOptions.compTarget.name}...")
println("Analyzing code...")
program.preprocessAst(errors)
program.checkIdentifiers(errors, compilerOptions)
errors.report()

View File

@ -39,9 +39,7 @@ class ModuleImporter(private val program: Program,
else -> candidates.first() // when more candiates, pick the one from the first location
}
val logMsg = "importing '${filePath.nameWithoutExtension}' (from file $srcPath)"
println(logMsg)
print(" importing '${filePath.nameWithoutExtension}' (from file $srcPath)\r")
val module = importModule(SourceCode.File(srcPath))
return Ok(module)
}
@ -91,7 +89,7 @@ class ModuleImporter(private val program: Program,
val importedModule =
moduleResourceSrc.fold(
success = {
println("importing '$moduleName' (from internal ${it.origin})")
print(" importing '$moduleName' (from internal ${it.origin})\r")
importModule(it)
},
failure = {
@ -99,7 +97,7 @@ class ModuleImporter(private val program: Program,
val moduleSrc = getModuleFromFile(moduleName, importingModule)
moduleSrc.fold(
success = {
println("importing '$moduleName' (from file ${it.origin})")
print(" importing '$moduleName' (from file ${it.origin})\r")
importModule(it)
},
failure = {