[LLVMdev] [RFC] Developer Policy for LLVM C API

Pete Cooper peter_cooper at apple.com
Mon Jul 20 09:40:24 PDT 2015


> On Jul 18, 2015, at 11:27 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> 
> 2. We don't have a good set of tests for it, nor do we have a good set of tutorials/documentation for it. Our tutorials, specifically, are in C++, not in C. We could break the C API and we'd likely remain unaware for quite awhile.
I think this is the most important point, that we lack testing for it.

IMO, the language doesn’t matter too much.  I’m happy with C or C++, but whichever (or both) or those are exposed in a stable way, we need the *users* of those APIs to help test it.

How about we add a StableAPI directory in unittests?  Then have a test written in C/C++ for each of the users of it.  So a WebKit.c test, Go.c, SomeProject.cpp, etc.

Then adding anything to the stable API must have a corresponding test, and changing the API shows us exactly which test broke, who cares about that test, and who to talk to about updating that API if we need to.  If the only test which breaks is WebKit then talk to WebKit, if its Go too then add them in, and so on.

Sure the tests will get large, but thats the point.  It would show us exactly what API users care about.  And the tests don’t need to actually run anything, just ensure that methods signatures are compatible with what they are using.

Cheers,
Pete

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150720/4dd40480/attachment.html>


More information about the llvm-dev mailing list