emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing a cl-defstruct definition in a published package


From: Stefan Monnier
Subject: Re: Changing a cl-defstruct definition in a published package
Date: Fri, 13 Jul 2018 23:36:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>   buffer checker filename line         column  message level id group)
[...]
>   buffer checker filename -coordinates -region message level id group)

OK, so the issue is with `line` and `column` which get replaced by
`-coordinates` and `-region`, the rest stays unchanged.  So maybe you
can arrange to auto-detect objects created with the old format.

> Most Flycheck checkers are defined using a standardized macro and do
> not have to worry about creating or accessing individual error
> structures, so that code is fine.  More complex error checkers, on the
> other hand, do create error objects directly (concrete examples
> include merlin, or any of the checkers that maintain a persistent
> background process).

IIUC, outside Flycheck the main operation called (and hence inlined) is
the constructor(s).  Are field accessors also used outside Flycheck?
If so, is there a chance that they are only ever used on those objects
that were created by the outside code as well (i.e. those inlined
accessors only see objects created by the compatible inline
constructors)?

I get the impression that maybe you can write a wrapper to access
`-coordinates` and `-region` which will check if either of those is of
the wrong type (but of the right type for `line` and `column` instead)
so it will know to fallback on the new code?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]