Behaviour of compiler src-prefix flag has changed in 0.7.0

42 views
Skip to first unread message

Vaci

unread,
Oct 4, 2019, 11:49:15 AM10/4/19
to Cap'n Proto
Hi,

The src-prefix flag to the Capnp schema compiler appears to be affected by the import-path flag in version 0.7.0:

Given a schema file in the directory structure

src/A/B.capnp

% capnp compile -oc++ --src-prefix=src src/A/B.capnp

results in the following files being generated:

./A/B.capnp.h
./A/B.capnp.c++

..however, running

% capnp compile -oc++ --src-prefix=src --import-path src/A src/A/B.capnp

the generated files lose their subdirectory structure:

./B.capnp.h
./B.capnp.c++

When using version 0.6.1 of the compiler, the subdirectory ./A is generated in both cases.

Is this behaviour change intentional?

Regards,
Vaci







Kenton Varda

unread,
Oct 4, 2019, 6:48:39 PM10/4/19
to Vaci, Cap'n Proto
Hi Vaci,

Thanks. This is a bug. It appears to have been introduced here:


Somehow, it took this long -- more than a year since the 0.7.0 release -- for anyone to notice.

I've filed an issue:


And made a pull request to fix it:


-Kenton

--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/71bc3c5c-6e6b-4728-b579-c1d3a1d80db1%40googlegroups.com.

Vaci

unread,
Oct 7, 2019, 9:38:55 AM10/7/19
to Cap'n Proto
Hi Kenton,

Thank you for the quick response! That patch fixes our 0.7.0 builds.

Cheers,
Vaci
 
Reply all
Reply to author
Forward
0 new messages