atlas-engineer / nclasses

A `define-class` macro for less boilerplate
Other
7 stars 2 forks source link

Have default-accessor-name-transformer obey :accessor-name-package. #6

Closed Ambrevar closed 1 year ago

Ambrevar commented 1 year ago

In https://github.com/atlas-engineer/nyxt/pull/2784 we discovered an issue: accessors are generated in the slot package.

This fixes it by having accessors generated in the current package, just as with dwim-accessor-name-transformer.

But is it what we want? In practice, it means that it we do not specify :accessor nil, a spurious accessor active-attributes-keys is generated.

An alternative would be to skip accessor generation if there is no :accessor slot option and if the parent slot has no accessor.

Ambrevar commented 1 year ago

In the end I did apply the heuristic, see commit https://github.com/atlas-engineer/nclasses/pull/6/commits/e056b389f0101e6e479b8f408dd3fd278311b079.

Ambrevar commented 1 year ago

@aartaka OK to merge?