chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] check for exported types, constants, inlin


From: megane
Subject: Re: [Chicken-hackers] [PATCH] check for exported types, constants, inline procedures (#1346)
Date: Thu, 10 Oct 2019 11:06:30 +0300
User-agent: mu4e 1.0; emacs 25.1.1

Peter Bex <address@hidden> writes:

> On Thu, Oct 03, 2019 at 01:11:31PM +0200, address@hidden wrote:
>> This patch extends 21ff0d6affb35f7184a5e78f9d4beccc869b47b2 to
>> type-names, inline procedures and constants, giving a warning when
>> an identifier naming such an entity is exported.
>
> Hi all,
>
> Apparently this commit broke our own build!  It turns out that tweaks.scm,
> which is included by support.scm (and others) defines inline versions of
> procedures which are also exported as regular procedure bindings by the
> module (chicken compiler support).

Thanks! Pushed.
>
> Attached is a patch which:
>
> a) Checks the list of unexportable stuff _after_ checking if there's a
>    regular or syntax identifier defined for that export inside the module.
> b) Restores types to the list of things checked that cannot be exported.

I added these points to the message.

>
> This is not ideal, as it allows one to have conflicting definitions in
> multiple "namespaces" (for example, define-external, define-inline and
> regular define for the same identifier) but at least CHICKEN itself will
> build again.
>
> One alternative could be to keep the current code and drop tweaks.scm.
> I don't know how much of an impact that will have on the performace, but
> it might be worth considering.  OTOH, this trick we're using in core
> might be used in other real world codebases as well...
>

Let's keep the original behavior for now.

Changing the export checking to fail on the hacks CHICKEN internally
uses would be a breaking change, and needs some more discussion. Maybe
that should be a CR, even.



reply via email to

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