koka icon indicating copy to clipboard operation
koka copied to clipboard

koka compiler doesn' t detect change for inlined files

Open kamoii opened this issue 2 years ago • 1 comments

When compiling with --execute flag, koka compiler doesn't seem to detect changes for inlined files. Is this intended or a bug? Is there a flag to detect changes for inlined files?

I'm tring to make a binding library for sqlite3. Project structure is:

$ tree src test
src
└── db
    ├── sqlite3-inline.c
    └── sqlite3.kk
test
└── main.kk

sqlite3.kk inlines sqlite-inline.c:

extern import
    c file "sqlite3-inline.c"

and test/main.kk imports db/sqlite3.

Running test code with following commands doesn't detect change for sqlite3-inline.c. It does detect change for sqlite3.kk and rebuild the library.

koka --vcpkg=./vcpkg --outputdir=./.out --include=./src -e test/main.kk

kamoii avatar May 14 '22 07:05 kamoii

Ah right -- that is a problem; for now you need to either touch the actual source file (.kk), or use the -r command line option (but that rebuilds everything). In the interactive environment you can use :f <file> to force recompilation.

daanx avatar May 24 '22 16:05 daanx