
I’m working on racket/src/rktio/rktio_fs.c
, but it seems the file isn’t processed when I run make
at the repo top-level. (To check this, I edited in an error, which wasn’t found/shown when running make
.) Do you have any idea what to do so that my changes to rktio_fs.c
are used?

I just tried inserting {
at the beginning of that file, and then running top-level make
and it failed for me

Interesting. Here it doesn’t, but I get an Exception: attempt to reference unbound identifier file-or-directory-stat at line 381, char 4 of primitive/kernel.ss
(with or without the {
).
I had assumed that the compilation of rktio_fs.c
would come before the processing of <http://kernel.ss\|kernel.ss>
because the Racket function defined in <http://kernel.ss\|kernel.ss>
depends on the new function in rktio_fs.c
. But it could be that the build doesn’t rely on that order.
So maybe we should try to fix the <http://kernel.ss\|kernel.ss>
issue first. :slightly_smiling_face:
As an experiment, I commented out the line in <http://kernel.ss\|kernel.ss>
and indeed rktio_fs.c
is processed. I’ll let make
finish and if it does without error, I’ll re-add the line in <http://kernel.ss\|kernel.ss>
. But maybe I’m still missing some magic to get my C function rktio_stat
in rktio_fs.c
known or the definition of file-or-directory-stat
in racket/src/io/file/main.rkt
to be picked up.

I have typedef struct rktio_stat_t {
/* TODO: Currently limited for testing */
intptr_t dev, inode, size;
} rktio_stat_t;
RKTIO_EXTERN rktio_stat_t *rktio_stat(rktio_t *rktio, rktio_const_string_t path, rktio_bool_t follow_links);
in racket/src/rktio/rktio.h
and the function rktio_stat
is defined in rktio_fs.c
. So I think so far this is ok. But again, maybe there’s something else missing.

Does running make rktio
in the cs
directory help?

There is some explanation about dependency tracking in the README in the cs
directory. If some file have already been built, I’m not sure if running make
at the top-level will recompile them.

I suppose deleting all compiled files should work though.