kicad-developers team mailing list archive
Mailing list archive
Re: Fixing libcommon
On 3/18/2017 10:18 AM, Maciej Suminski wrote:
> In order to remove the hardcoded values from WORKSHEET_VIEWITEM, I
> started moving code that used to be compiled multiple times to separate
> units. This is also a basic way to solve the internal units conversion
> There are still a few more files that are compiled multiple times. I
> plan to fix them as well, but first I want to send the first patches to
> see if we all agree on the proposed solution.
> Alternatively, there could be an abstract class to provide conversion
> methods. If it is preferred, then we need to decide how to access its
> instance (singleton, attach to KiFace, static object?)
This would be my preference. The solution in your patch set has a lot
of duplicate code with different per application scalars. I would think
that an abstract class would be a more elegant design. I OK with
pushing your current patches and refactoring the scalar code into an
abstract class at a later date. I don't have a strong preference for
singleton versus static.
> Ultimately we can have a real common library for all apps (libkicommon?)
> that could be compiled as a shared library. Such approach should reduce
> *.kiface files size and linking time.
This should be the goal. My guess is there are lots of
inter-dependencies that will make this goal more challenging then you
might expect. I looked at this a long time ago and that was the
conclusion that I came to. Maybe over the years, some of that ugliness
has been refactored away.
> Any thoughts?
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp