mirror of
https://github.com/irmen/prog8.git
synced 2024-09-07 19:54:26 +00:00
compiler watch mode is a bit more robust now against crashes during compilation
This commit is contained in:
parent
e17c18b653
commit
efa42d5d96
@ -57,6 +57,7 @@ private fun compileMain(args: Array<String>) {
|
|||||||
|
|
||||||
if(watchMode) {
|
if(watchMode) {
|
||||||
val watchservice = FileSystems.getDefault().newWatchService()
|
val watchservice = FileSystems.getDefault().newWatchService()
|
||||||
|
val allImportedFiles = mutableSetOf<Path>()
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
println("Continuous watch mode active. Modules: $moduleFiles")
|
println("Continuous watch mode active. Modules: $moduleFiles")
|
||||||
@ -67,7 +68,9 @@ private fun compileMain(args: Array<String>) {
|
|||||||
results.add(compilationResult)
|
results.add(compilationResult)
|
||||||
}
|
}
|
||||||
|
|
||||||
val allImportedFiles = results.flatMap { it.importedFiles }
|
val allNewlyImportedFiles = results.flatMap { it.importedFiles }
|
||||||
|
allImportedFiles.addAll(allNewlyImportedFiles)
|
||||||
|
|
||||||
println("Imported files (now watching:)")
|
println("Imported files (now watching:)")
|
||||||
for (importedFile in allImportedFiles) {
|
for (importedFile in allImportedFiles) {
|
||||||
print(" ")
|
print(" ")
|
||||||
|
@ -5,13 +5,9 @@
|
|||||||
|
|
||||||
main {
|
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 () {
|
sub start () {
|
||||||
|
|
||||||
txt.chrout('\n')
|
|
||||||
txt.chrout('\n')
|
|
||||||
test_stack.test()
|
test_stack.test()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user