Extensions Ugly Toupee or Hipster Hairdo?
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Bergmann, Stephan
"But what about the extensions?" can be the death knell for whatever cool newfeature somebody tries to implement in LibreOffice, as extensions naturallyask for interface stability. But what about them, anyway? Are they the saviourthat brings diversity to our desktops, or are they just a ghostly phantom thatstifles innovation? Lets take a look at the extension landscape out there.
 Okay, is that microphone working? Okay, great. Yeah, it's about time to start. Wake up again, everybody. Yeah, what I'm talking about today, come on back again to that topic. We're going to talk about the work of the office extensions and the implications they have on us developers doing our work or how they sometimes hinder us. So, to see what the issue is with extensions, that's the same boobly that earlier today was all in praise of extensions. How they help us by keeping all this extra stuff out of our way of the developers way. But of course, there's also implications to that and in the end, nobody of us developers does love extensions. Because, yeah, what's the summary? They keep getting into our way. We always need to make sure, take care that those points where the extensions can interact with the core, that these points keep working and it's not even always easy to tell what these points exactly are. And whether if you do something, you'll actually break them in a way that extensions no longer will work. For example, do you spot the error in the previous conversation? Tristan, do you? No. The error in there, the back, where's the thing that, that's not an ABI problem with the LED and the light bulbs. Because the LED bulb is a perfect replacement for the light bulb. From the interface perspective, it is. And that counts here. If anybody is curious what we developers do all the day, then come join us on our ISEA channel. Get a quite different picture of what you might have thought the developers are doing for a day job. So, yeah, as that example shows, it's sometimes difficult to tell if that incompatible will that prove to be a problem for our extensions or not. And on the other side of the divide, there's the users and the extension authors. And they send back reports. This is one random example, more or less. Something stopped working. The interesting bit about this back report is that it is due to some commit that I did. That's not the interesting part. There's more of those. The interesting part is that I thought long and hard about whether actually doing this change would be compatible or incompatible. And what this boils down to is that in our C++ code, we have different types representing the UNO types. And there is one type for UNO character. And that used to be the same type as the one we used for the small unsigned integer types. And because C++ wasn't expressive enough in its type system to have different types for these, so they were combined into one. Come along C++ 11 with a new type for larger characters. So we finally were able to split these two into two. That makes the code easier. There's some special cases in the code that can go away. There's even some bugs lurking in the code because one type was used of the other one in places where it shouldn't be. So, and on the interface for C++ extensions, I checked carefully that there was no place where this would cause any problems. So there shouldn't be any problem with C++ extensions. But as it turned out, it caused a problem for basic code because there was a bug, kind of bug in the writer core C++ code. There is one case where you can have a value that is a single character. You usually don't have that because it doesn't make much sense anyway with Unicode to speak about single characters or single UTF 16 values. But there was one case where there's some separator for some sorting and I don't know. And the bug in writer was that it used the integer type instead of the character type. And the problem with basic is that it doesn't have a character type either. So it puts in, when you want to use that interface from basic, you put in an integer value representing the character. And now suddenly, writer started to no longer accept an integer there but insisted on having a character and that broke it. And there was no way for basic to fix that in basic and put in a character. So first I thought, oh my God, I broke everything because now with that change, now there's no longer any interoperability between the basic code and the writer code but then I checked carefully that there's just one place where things go wrong and I said, oh, I'll just fix that and sweep it on the carpet and you'll never know about that issue. So again, to summarize, the other side of the divide, the users and the extensions authors, they don't like incompatible change, of course, and again, it's sometimes quite hard to tell whether a change is compatible or incompatible. You try to do your best and still you get it wrong. So coming back to the start of the talk, this is where we are having problems with these beloved extensions. We as core developers, I mean, I for one can't even operate the impris part to create these slides and far less do I know what people out there use LibreOffice to create extensions and stuff like that. So extensions for core developers are always these scared beasts out there in the wild that you rarely do spot and you don't know much about them. So is this caring about extensions thinking, oh, my God, I'll have to be careful to not break anything there because it's something that is legend tells that it is a place where extensions plug in is that all wasted fears because we don't even have any extensions or are all these extensions so ugly that you don't want to care about them anyway. So yeah, I wanted to learn on what side of this guinea pig divide we are, whether we are the ugly one or the more beautiful one. So went to the newly revamped Andreas, not here, no, he did most of the part of the work there to get this, to get our extension side into better shape again and into decent shape. And yeah, let's look at what we actually have. And if you try to list all these extensions that are out there on this official kind of page, then you get to the number of 308 ones that we have. And that should be an interesting sample to look at. So what I did was a little downloaded all these or try to download them all through the website. The issue is that you can either host them on the website directly or have them on your own and linked to that. But sometimes there were no links or at least I was too dumb to find those links. So 71 of them, I couldn't find any artifacts to download maybe Andreas if he would hear, would know where or went wrong. For others, I tried hard to do find some even went into cases to that search for abomination and found the stuff there. But long story short, the rest of them, there was some kind of noise around there, some things that weren't packaged up correctly. I guess it's quite hard for somebody who wants to produce a dictionary for a Libre office to actually do the final steps of creating this OXT file. There is some details in there that are difficult. Some people put up other artifacts there, only a small percentage. So many of our extension authors are great in having overcome that not small hurdle of actually producing such an OXT file. And of those 228 remaining that I downloaded and looked into their manifest files, the picture is that 81 of them don't include any code at all. So they are typically they are dictionaries or gallery images and what you need to do there is provide the pure data plus some configuration data that tells Libre office where the files in this extension are like telling Libre office that there is a dictionary file contained in that. There is always some configuration data in every extension, but many, many, many of them just contain that and nothing more in people are happy with that. Then there were also 81 that just contain basic code besides also containing configuration data, typically all of them typically do. So 81 just contain basic. 28 were Python, some kind of ladder up in the complexity of these languages probably. 22 were Java, there were five that you're scripting in some way mostly Python again and just four of them, just four were C++. So we have the most fears of breaking anything and that included even two different versions of the same extension that we even build bundled with Libre office itself and you build it there. We built the code so that's an easy one to keep track of and seven of them I don't know what was in there. I couldn't find anything so my scripting maybe was broken. So that's quite reassuring for us that most of them make very little use of the points that we offer for plug-in and the ones that actually even do like the basic ones. We have that well under control because the basic code is part of the Libre office code or the code to execute basic is ours to control. So if we find out that we break something badly there, we could always build and scaffolding there to alleviate these problems and make them go away again. And ironically the things that we as developers think about most when we think about do we break anything with an incompatible change. That's the one that in practice, matter of the least. I don't know if there's beyond those few that are actually in the extension store if there's a larger corpus of C++ extensions out. There don't talk about this way of life. And that's kind of what I wanted to tell you today. No, no, not not exactly. I think. We maybe I mean you still don't want to these three to four people out there doing the extensions. I'm not sure how much we want to eliminate them. But yeah, well, I think there are two parts of that story. We don't want that. We don't. What was it? Sorry, I was busy with the whole setup and stuff of the SDKs. Oh, that's working like a charm. You know what to do. Yeah, that's another. Sure. I mean, I was impressed by the actual by the number of of actually working extensions there because as I said, it's hard to do these and all my sympathy to these people out there who who feel the pain during these. So I mean, this is quite a small sample. I've seen what is out there in the real world. So I would say looking at the open office extension, I know that's the number of those sorts of private. Well, if the confusion is there's nothing or there's just four and then you know, if you make decisions based on that confusion, then perhaps. I know at least. Yeah, but the problem is always, as I said, they are we don't know much about them. We don't hear much about them as long as they work. We don't hear anything. Many of them apparently even don't come to us if things start to break. So it's really difficult for us to draw anything from that. But there was one more question over here. So I think we're running late. So if you can raise. Yes, there is there is basic is different in that it has a more direct access, but you can also use the, you know, things from basic and the interoperability things are the is mostly about the, the, the, you know, parts. So the rest of this basic runtime is, is rather not relevant to this discussion here. Basic. Yeah. Okay. Thank you.
 Okay, is that microphone working?  Okay, great.  Yeah, it's about time to start.  Wake up again, everybody.  Yeah, what I'm talking about today, come on back again to that topic.  We're going to talk about the work of the office extensions and the implications they have on us developers doing our work or how they sometimes hinder us.  So, to see what the issue is with extensions, that's the same boobly that earlier today was all in praise of extensions.  How they help us by keeping all this extra stuff out of our way of the developers way.  But of course, there's also implications to that and in the end, nobody of us developers does love extensions.  Because, yeah, what's the summary?  They keep getting into our way.  We always need to make sure, take care that those points where the extensions can interact with the core,  that these points keep working and it's not even always easy to tell what these points exactly are.  And whether if you do something, you'll actually break them in a way that extensions no longer will work.  For example, do you spot the error in the previous conversation?  Tristan, do you? No.  The error in there, the back, where's the thing that, that's not an ABI problem with the LED and the light bulbs.  Because the LED bulb is a perfect replacement for the light bulb.  From the interface perspective, it is.  And that counts here.  If anybody is curious what we developers do all the day, then come join us on our ISEA channel.  Get a quite different picture of what you might have thought the developers are doing for a day job.  So, yeah, as that example shows, it's sometimes difficult to tell if that incompatible will that prove to be a problem for our extensions or not.  And on the other side of the divide, there's the users and the extension authors.  And they send back reports.  This is one random example, more or less.  Something stopped working.  The interesting bit about this back report is that it is due to some commit that I did.  That's not the interesting part.  There's more of those.  The interesting part is that I thought long and hard about whether actually doing this change would be compatible or incompatible.  And what this boils down to is that in our C++ code, we have different types representing the UNO types.  And there is one type for UNO character.  And that used to be the same type as the one we used for the small unsigned integer types.  And because C++ wasn't expressive enough in its type system to have different types for these, so they were combined into one.  Come along C++ 11 with a new type for larger characters.  So we finally were able to split these two into two.  That makes the code easier.  There's some special cases in the code that can go away.  There's even some bugs lurking in the code because one type was used of the other one in places where it shouldn't be.  So, and on the interface for C++ extensions, I checked carefully that there was no place where this would cause any problems.  So there shouldn't be any problem with C++ extensions.  But as it turned out, it caused a problem for basic code because there was a bug, kind of bug in the writer core C++ code.  There is one case where you can have a value that is a single character.  You usually don't have that because it doesn't make much sense anyway with Unicode to speak about single characters or single UTF 16 values.  But there was one case where there's some separator for some sorting and I don't know.  And the bug in writer was that it used the integer type instead of the character type.  And the problem with basic is that it doesn't have a character type either.  So it puts in, when you want to use that interface from basic, you put in an integer value representing the character.  And now suddenly, writer started to no longer accept an integer there but insisted on having a character and that broke it.  And there was no way for basic to fix that in basic and put in a character.  So first I thought, oh my God, I broke everything because now with that change, now there's no longer any interoperability between the basic code  and the writer code but then I checked carefully that there's just one place where things go wrong and I said, oh, I'll just fix that and sweep it on the carpet  and you'll never know about that issue.  So again, to summarize, the other side of the divide, the users and the extensions authors, they don't like incompatible change,  of course, and again, it's sometimes quite hard to tell whether a change is compatible or incompatible.  You try to do your best and still you get it wrong.  So coming back to the start of the talk, this is where we are having problems with these beloved extensions.  We as core developers, I mean, I for one can't even operate the impris part to create these slides and far less do I know what people out there use LibreOffice  to create extensions and stuff like that.  So extensions for core developers are always these scared beasts out there in the wild that you rarely do spot and you don't know much about them.  So is this caring about extensions thinking, oh, my God, I'll have to be careful to not break anything there  because it's something that is legend tells that it is a place where extensions plug in is that all wasted fears because we don't even have any extensions  or are all these extensions so ugly that you don't want to care about them anyway.  So yeah, I wanted to learn on what side of this guinea pig divide we are, whether we are the ugly one or the more beautiful one.  So went to the newly revamped Andreas, not here, no, he did most of the part of the work there to get this, to get our extension side into  better shape again and into decent shape.  And yeah, let's look at what we actually have.  And if you try to list all these extensions that are out there on this official kind of page, then you get to the number of 308 ones that we have.  And that should be an interesting sample to look at.  So what I did was a little downloaded all these or try to download them all through the website.  The issue is that you can either host them on the website directly or have them on your own and linked to that.  But sometimes there were no links or at least I was too dumb to find those links.  So 71 of them, I couldn't find any artifacts to download maybe Andreas if he would hear, would know where or went wrong.  For others, I tried hard to do find some even went into cases to that search for abomination and found the stuff there.  But long story short, the rest of them, there was some kind of noise around there, some things that weren't packaged up correctly.  I guess it's quite hard for somebody who wants to produce a dictionary for a Libre office to actually do the final steps of creating this OXT file.  There is some details in there that are difficult.  Some people put up other artifacts there, only a small percentage.  So many of our extension authors are great in having overcome that not small hurdle of actually producing such an OXT file.  And of those 228 remaining that I downloaded and looked into their manifest files, the picture is that 81 of them don't include any code at all.  So they are typically they are dictionaries or gallery images and what you need to do there is provide the pure data plus some configuration data that tells Libre office where the files in this extension are like telling Libre office that there is a dictionary file contained in that.  There is always some configuration data in every extension, but many, many, many of them just contain that and nothing more in people are happy with that.  Then there were also 81 that just contain basic code besides also containing configuration data, typically all of them typically do.  So 81 just contain basic.  28 were Python, some kind of ladder up in the complexity of these languages probably.  22 were Java, there were five that you're scripting in some way mostly Python again and just four of them, just four were C++.  So we have the most fears of breaking anything and that included even two different versions of the same extension that we even build bundled with Libre office itself and you build it there.  We built the code so that's an easy one to keep track of and seven of them I don't know what was in there.  I couldn't find anything so my scripting maybe was broken.  So that's quite reassuring for us that most of them make very little use of the points that we offer for plug-in and the ones that actually even do like the basic ones.  We have that well under control because the basic code is part of the Libre office code or the code to execute basic is ours to control.  So if we find out that we break something badly there, we could always build and scaffolding there to alleviate these problems and make them go away again.  And ironically the things that we as developers think about most when we think about do we break anything with an incompatible change.  That's the one that in practice, matter of the least.  I don't know if there's beyond those few that are actually in the extension store if there's a larger corpus of C++ extensions out.  There don't talk about this way of life.  And that's kind of what I wanted to tell you today.  No, no, not not exactly.  I think.  We maybe I mean you still don't want to these three to four people out there doing the extensions.  I'm not sure how much we want to eliminate them.  But yeah, well, I think there are two parts of that story.  We don't want that.  We don't.  What was it?  Sorry, I was busy with the whole setup and stuff of the SDKs.  Oh, that's working like a charm.  You know what to do.  Yeah, that's another.  Sure.  I mean, I was impressed by the actual by the number of of actually working extensions there because as I said, it's hard to do these and all my sympathy to these people out there who who feel the pain during these.  So I mean, this is quite a small sample.  I've seen what is out there in the real world.  So I would say looking at the open office extension, I know that's the number of those sorts of private.  Well, if the confusion is there's nothing or there's just four and then you know, if you make decisions based on that confusion, then perhaps.  I know at least.  Yeah, but the problem is always, as I said, they are we don't know much about them.  We don't hear much about them as long as they work.  We don't hear anything.  Many of them apparently even don't come to us if things start to break.  So it's really difficult for us to draw anything from that.  But there was one more question over here.  So I think we're running late.  So if you can raise.  Yes, there is there is basic is different in that it has a more direct access, but you can also use the, you know, things from basic and the interoperability things are the is mostly about the, the, the, you know, parts.  So the rest of this basic runtime is, is rather not relevant to this discussion here.  Basic.  Yeah.  Okay.  Thank you.
Extensions_Ugly_Toupee_or_Hipster_Hairdo_0_47.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_48_107.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_108_1103.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_1104_1775.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_1776_2003.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_2004_3023.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_3024_4523.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_4524_4847.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_4848_9851.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_9852_12419.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_12420_12743.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_12744_13907.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_13908_14855.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_14856_16055.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_16056_21779.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_21780_28403.png Extensions_Ugly_Toupee_or_Hipster_Hairdo_28404_28523.png