aaron.ballman added a reviewer: rsmith.
aaron.ballman added a subscriber: rsmith.
aaron.ballman added a comment.

Adding @rsmith for questions about stability guarantees.



================
Comment at: clang/docs/ClangPlugins.rst:74
+
+  class ExampleAttrInfo : public ParsedAttrInfo {
+  public:
----------------
john.brawn wrote:
> aaron.ballman wrote:
> > We should be documenting the fields of `ParsedAttrInfo` that the user would 
> > be interacting with. We should also consider whether we are introducing a 
> > new stability guarantee with that interface and document accordingly. I 
> > think we should not promise that this structure will be stable from release 
> > to release, but it will be stable within a given release (e.g., the type 
> > can change between Clang 11 -> Clang 12, but the type will not change 
> > between Clang 11 -> Clang 11.0.1).
> I'll add documentation of the relevant fields. As to API stability, looking 
> at Tooling.rst it says only libclang has a stable API (or rather, it says 
> libclang has a stable API, says libtooling doesn't, and says nothing about 
> plugins).
We may want to bump this out into a larger discussion and it shouldn't impact 
the ability to move forward with this patch while we discuss.

I think that for practical purposes we should be guaranteeing ABI stability for 
plugins during a patch releases (10.0 -> 10.0.1) or otherwise patch releases 
become a major compiler upgrade as opposed to an incremental one. I thought 
that we had already promised such stability for things like the AST 
serialization format for similar reasons, but maybe I'm mis-remembering. 
@rsmith -- do you have thoughts?

To be clear about the situation I'm concerned with -- it would be a shame to 
have a working attribute plugin in Clang 10.0 that either fails to load or 
silently behaves differently in Clang 10.0.1 because we generally want 
developers to be able to move to the latest patch release without undue burden.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D31342/new/

https://reviews.llvm.org/D31342



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to