Properly handle CAPI vs Lua libraries #59
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Awesome documentation groups some CAPI objects with their Lua library from
awful
. It is the case forclient
,screen
andtag
that also have theirawful.{client,screen,tag}
libraries.We need to make sure to place every member of these modules to the correct location.
Note that the CAPIs are globally available in the awesome runtime.
screen
,client
andtag
should be handled specifically to allow definition from the Tealglobal_env_def
(see #60)Properly handle CAPI vs Lua object docto Properly handle CAPI vs Lua librariesThe
global_env_def
should define CAPIs records forscreen
,client
andtag
.The libraries
awful.{client,screen,tag}
should define records named after the common First_letter_capitalized convention.To prevent circular dependencies and
global_env_def
to depend on non-global modules: Theawful.
should only define the public static functions exposed by the module. The instance level object type should always refer to the CAPIs records.It means the CAPIs types should never be
require
d by any means. Only theawful.
can berequire
d, and as a user, you onlyrequire
them to use their static functions.→ This is the way
Most of the work has been done in the scope of #60 with #64.
We want now to improve the implementation by being smarter. We need to make the difference between the members that should be in the
global_env
and these that should be in theawful.
modules.The code refactor from #76 manages this auto-magically. So there should be nothing more to do beside finishing the work on this other PR.
Aire-One referenced this issue2023-05-01 16:45:19 +02:00