diff --git a/compiler/src/prog8/CompilerMain.kt b/compiler/src/prog8/CompilerMain.kt index a3fcaaf56..4b6d2f91b 100644 --- a/compiler/src/prog8/CompilerMain.kt +++ b/compiler/src/prog8/CompilerMain.kt @@ -57,6 +57,7 @@ private fun compileMain(args: Array) { if(watchMode) { val watchservice = FileSystems.getDefault().newWatchService() + val allImportedFiles = mutableSetOf() while(true) { println("Continuous watch mode active. Modules: $moduleFiles") @@ -67,7 +68,9 @@ private fun compileMain(args: Array) { results.add(compilationResult) } - val allImportedFiles = results.flatMap { it.importedFiles } + val allNewlyImportedFiles = results.flatMap { it.importedFiles } + allImportedFiles.addAll(allNewlyImportedFiles) + println("Imported files (now watching:)") for (importedFile in allImportedFiles) { print(" ") diff --git a/examples/test.p8 b/examples/test.p8 index 9197681cd..1c816a981 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -5,13 +5,9 @@ main { - ;uword cmap = memory("palette", 256*4) ; only use 768 of these, but this allows re-use of the same block that the bmp module allocates - uword num_colors = rnd() sub start () { - txt.chrout('\n') - txt.chrout('\n') test_stack.test() }