← Back to team overview

kicad-developers team mailing list archive

Re: LOCALE_IO sucks

 

On Tue, Jul 18, 2017 at 10:11:39AM -0400, Wayne Stambaugh wrote:
> On 7/18/2017 9:47 AM, Chris Pavlina wrote:
> > Yes, the goal would be to try to make the footprint parser entirely
> > non-locale-sensitive so as not to need to switch anyway. The problem
> > with LOCALE_IO is that it's incompatible with threading (especially on
> > Windows where msys2 provides no concept of a thread-local locale), so
> > there's no way to background parsing. I really need to eliminate a GUI
> > freeze on parse, people are not happy with it.
> 
> This make more sense now.
> 
> > 
> > As for removing it entirely from other places too, this may be less
> > feasible. For now I just want it out of the footprint parser. Removing
> > it in other places too may have to wait.
> 
> There is nothing preventing someone from using footprints from other
> plugins so if you don't fix it in every plugin that supports reading
> footprint libraries, you will not completely resolve the issue.

Yeah, I'm aware of this. How I proceed is going to depend on how
difficult it is to fix all the plugins; I haven't done all my homework
yet. I just want to make sure nobody's going to say "I spent 1337 hours
on that code how dare you remove it" ;)

> 
> > 
> > On Jul 18, 2017 7:12 AM, "Wayne Stambaugh" <stambaughw@xxxxxxxxx
> > <mailto:stambaughw@xxxxxxxxx>> wrote:
> > 
> >     I have no objections as long as nothing gets broken and the code doesn't
> >     get more complicated (less readable).  LOCALE_IO exists in all of the
> >     plugins not just the kicad plugin so there is a lot of code to fix.  The
> >     reason LOCALE_IO exists is to hide resetting the locale on exceptions.
> >     I don't see how any other solution is going to result in cleaner code
> >     but I'm willing to entertain the idea.  Please test your changes
> >     thoroughly and submit a patch so we can test it and take a look at it
> >     before committing.
> > 
> >     On 7/17/2017 8:44 PM, Chris Pavlina wrote:
> >     > If I somehow found the time to strip LOCALE_IO completely out of the
> >     > footprint parser without changing the behavior, would anyone have any
> >     > religious objections or otherwise mourn the loss?
> >     >
> > 
> >     _______________________________________________
> >     Mailing list: https://launchpad.net/~kicad-developers
> >     <https://launchpad.net/~kicad-developers>
> >     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> >     Unsubscribe : https://launchpad.net/~kicad-developers
> >     <https://launchpad.net/~kicad-developers>
> >     More help   : https://help.launchpad.net/ListHelp
> >     <https://help.launchpad.net/ListHelp>
> > 


References