[Top][All Lists]

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

bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validati

From: Noam Postavsky
Subject: bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter)
Date: Thu, 28 Sep 2017 20:35:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

Eric Abrahamsen <address@hidden> writes:

> Essentially it is validating twice, both before and after the actual
> objects are created. I don't have a very firm grasp of all the code
> involved, but in principle I would prefer just to eval all object
> construction forms regardless, and then let it blow up at "real"
> validation time -- it was going to blow up anyway.

Hmm, yeah, it does look the prevalidation is mostly redundant work.  The
docstring of eieio-persistent-convert-list-to-object mentions malicious
code, perhaps the prevalidation should be with unsafep (i.e., don't try
to typecheck anything, just make sure it's safe to eval).  This would
require that object constructors could be marked safe though.

> But again, my patch or something like it would be enough to get
> everything working as advertised.

Right.  I think your patch is probably fine, though a few tests might a
good idea too.

>>> I don't think the tabs were my fault! What's Emacs policy on this?
>> I believe the policy is that new code should use spaces (although
>> sometimes people ignore this, it's not a big deal), but don't touch
>> lines just for the sake of changing the whitespace.
> Good to know, thanks. In lines of code I've added, indentation will be
> done with spaces, but I suppose that's okay?

Yes, sorry for being unclear, that's what I meant.  "new code" was
supposed to refer to lines that are added (or modified), as opposed to
"old code" being the unchanged lines.

reply via email to

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