Re: [Libreoffice] Extension dependencies

2011-11-15 Thread Stephan Bergmann

On 11/09/2011 09:45 AM, Stephan Bergmann wrote:

So, I think I will just introduce a new LibreOffice-minimal-version
dependency after all.


http://cgit.freedesktop.org/libreoffice/core/commit/?id=8a993919377f0b602b7db88d1de6696b21a11cbf 
does that, see 
https://wiki.documentfoundation.org/Development/Extension_Development 
for details.


Developers of products derived from LO beware:  The value of the LO 
reference version (against which the actual values in such extension 
dependencies are compared) is taken from the 
/org.openoffice.Setup/Product/ooSetupVersionAboutBox configuration item 
(as that, unlike ooSetupVersion, contains all of major, minor, micro), 
which in turn obtains its value from the ABOUTBOXPRODUCTVERSION variable 
defined in instsetoo_native/util/openoffice.lst.  If you change that 
value to no longer match the value for the underlying LO reference 
version, you need to adapt the code in 
desktop/deployment/misc/dp_dependencies.cxx accordingly.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-15 Thread Christophe Strobbe

Hi,

I am responding to the first message in this thread because it seems 
to be relevant to Java-based extensions.



At 09:59 4-11-2011, Stephan Bergmann wrote:

Hi all,

As already mentioned briefly in my talk at LOCon, we need to make up 
our mind how to handle LO extension dependencies.


Each .oxt extension can carry any number of dependencies, specifying 
conditions that need to be met by the hosting LO installation for 
the extension to be successfully deployable (see 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Dependencies).


This page links to 
http://openoffice.org/extensions/description/2006, which returns an 
ERROR 404, so even if an extension developer wanted to document more 
detailed dependencies, they would not know what syntax or elements to 
use in their description.xml file.


I was confronted with this problem just today because a new 
Java-based extension cannot be installed on some Ubuntu systems even 
though it installs without problems on Windows and some other Ubuntu systems.

The extension manager displayed the following error dialog:
(com.sun.star.deployment.DeploymentException) { { Message = An error 
occurred while enabling: accessodf-addon.jar, Context = 
(com.sun.star.uno.XInterface) @a403870 }, Cause = (any) { 
(com.sun.star.registry.CannotRegisterImplementationException) {{ 
Message = , Context = (com.sun.star.uno.XInterface)} @0 } } } }


It turns out that this issue can be solved with
sudo apt-get install libreoffice-java-common

So I thought about how to document that dependency in 
description.xml, but I couldn't ... (And libreoffice-java-common or 
openoffice.org-java-common may be rather broad.)


Best regards,

Christophe



The mechanism was designed to allow for any number of fine-grained 
dependency specifications (this extension requires availability of 
com.sun.star.whatever.Service), but only a coarse-grained 
OpenOffice.org-minimal-version ever got defined (and also a 
maximal-version one).  After all, it is hard (or at least tedious) 
for extension developers to come up with a precise list of features 
they depend on, which would be needed to specify a precise list of 
fine-grained dependencies.  A single minimal-version dependency 
appeared so much easier to use.


The OpenOffice.org-minimal-version dependency worked fine as long as 
OOo was the de-facto standard, with derivatives tracking OOo 
development rather closely and producing new versions in sync with 
upstream OOo. The minimal-version dependency's version value was to 
be interpreted as the version of the underlying OOo reference 
version, so even if a derivative used a different versioning scheme 
everything worked out.  An extension developed for one product could 
also be deployed in a different one (at least in theory; of course 
there are always minor glitches that spoil the picture).


Now, LO and OOo (now AOOo) are no longer in such close relation.  LO 
is heading towards its version 3.5 already while AOOo did not yet 
publish its version 3.4, and new features are routinely added to LO 
that are unlikely to be included into AOOo.  This leads to the following items:


** How shall LO handle the OpenOffice.org-minimal-version dependency?

Strictly speaking, LO 3.4/3.5 should still check against an 
OpenOffice.org-minimal-version value of 3.3, as that's the latest 
available (A)OOo version.  However, for LO 3.4, this check has 
(probably accidentally) been changed to 3.4 (and with the current 
code towards LO 3.5 it has yet again changed to 3.5).  I would 
argue to leave it at 3.4 for both LO 3.4 and LO 3.5.  (For one, it 
can obviously no longer be changed back to 3.3 for LO 3.4, and 
changing it back to 3.3 for LO 3.5 would probably cause more 
confusion than its worth.  For another, semantically the check will 
likely be more-or-less correct, matching the features an AOOo 3.4 
will presumably come out with.)  If no one objects, I will adapt LO 
3.5 so that it still checks for 3.4, not 3.5.


In the future, when AOOo releases new versions after AOOo 3.4, we 
would need to check whether it semantically makes sense for LO to 
bump its OpenOffice.org-minimal-version check (i.e., whether the 
features of that new AOOo version are also available in LO).


** How to specify dependencies for newly introduced LO features?

One option would be to add an additional LibreOffice-minimal-version 
dependency.  Another option would be to actually make use of 
fine-grained dependencies and introduce them as needed (i.e., 
whenever an extension developer wants to make use of a new LO 
feature, a corresponding dependency would have to be added).


The former has as pro its ease of use.  The latter has as pro that 
it shows a way out of the problems caused by 
OpenOffice.org-minimal-version and for an opportunity of continued 
sharing of extensions across products:  If each extension only lists 
the features it requires, regardless of any product's version 
numbers, it 

Re: [Libreoffice] Extension dependencies

2011-11-15 Thread Stephan Bergmann

On 11/15/2011 01:39 PM, Christophe Strobbe wrote:

At 09:59 4-11-2011, Stephan Bergmann wrote:

Each .oxt extension can carry any number of dependencies, specifying
conditions that need to be met by the hosting LO installation for the
extension to be successfully deployable (see
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Dependencies).



This page links to http://openoffice.org/extensions/description/2006,
which returns an ERROR 404, so even if an extension developer wanted to
document more detailed dependencies, they would not know what syntax or
elements to use in their description.xml file.


http://openoffice.org/extensions/description/2006; is only used as an 
XML namespace name on that page.  URLs used as XML namespace names are 
not generally expected to be dereferencable (and are often not).  (That 
the wiki software used for that page displays that string as a browsable 
link appears to be an unfortunate mis-feature.)


The general syntax for dependencies within description.xml is described 
on that page, in the second-last paragraph (that also contains the 
mis-links).  For the description of individual dependencies, follow the 
link to 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Description_of_XML_Elements#Element_.2Fdescription.2Fdependencies 
labelled XML description for description.xml in the See also section 
at the bottom of the page.  (And for the description of individual 
dependencies relative to LO instead of OOo, 
https://wiki.documentfoundation.org/Development/Extension_Development 
is the new starting point.)



I was confronted with this problem just today because a new Java-based
extension cannot be installed on some Ubuntu systems even though it
installs without problems on Windows and some other Ubuntu systems.
The extension manager displayed the following error dialog:
(com.sun.star.deployment.DeploymentException) { { Message = An error
occurred while enabling: accessodf-addon.jar, Context =
(com.sun.star.uno.XInterface) @a403870 }, Cause = (any) {
(com.sun.star.registry.CannotRegisterImplementationException) {{ Message
= , Context = (com.sun.star.uno.XInterface)} @0 } } } }

It turns out that this issue can be solved with
sudo apt-get install libreoffice-java-common

So I thought about how to document that dependency in description.xml,
but I couldn't ... (And libreoffice-java-common or
openoffice.org-java-common may be rather broad.)


Yes, extension dependencies are currently only able to express 
dependencies on a complete LO installation.  Dependencies that are not 
fulfilled because only a subset of LO functionality is installed are not 
supported.  (And note that what those available subsets are is typically 
also specific to each LO distribution, even if the optional module 
structure in scp2 sets some common ground.)


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-15 Thread Christophe Strobbe

Hi Stephan,

Thanks for the additional guidance.

At 15:48 15-11-2011, Stephan Bergmann wrote:

On 11/15/2011 01:39 PM, Christophe Strobbe wrote:

At 09:59 4-11-2011, Stephan Bergmann wrote:

Each .oxt extension can carry any number of dependencies, specifying
conditions that need to be met by the hosting LO installation for the
extension to be successfully deployable (see
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Dependencies).


This page links to http://openoffice.org/extensions/description/2006,
which returns an ERROR 404, so even if an extension developer wanted to
document more detailed dependencies, they would not know what syntax or
elements to use in their description.xml file.


http://openoffice.org/extensions/description/2006; is only used as 
an XML namespace name on that page.  URLs used as XML namespace 
names are not generally expected to be dereferencable (and are often 
not).  (That the wiki software used for that page displays that 
string as a browsable link appears to be an unfortunate mis-feature.)


Ah, yes. I was hoping to find some information on the Others item 
in the list of child elements at 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Description_of_XML_Elements#Element_.2Fdescription.2Fdependencies. 
My hope got the better of my XML knowledge :-(



The general syntax for dependencies within description.xml is 
described on that page, in the second-last paragraph (that also 
contains the mis-links).  For the description of individual 
dependencies, follow the link to 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Description_of_XML_Elements#Element_.2Fdescription.2Fdependencies 
labelled XML description for description.xml in the See also 
section at the bottom of the page.  (And for the description of 
individual dependencies relative to LO instead of OOo, 
https://wiki.documentfoundation.org/Development/Extension_Development 
is the new starting point.)



I was confronted with this problem just today because a new Java-based
extension cannot be installed on some Ubuntu systems even though it
installs without problems on Windows and some other Ubuntu systems.
The extension manager displayed the following error dialog:
(...)
It turns out that this issue can be solved with
sudo apt-get install libreoffice-java-common

So I thought about how to document that dependency in description.xml,
but I couldn't ... (And libreoffice-java-common or
openoffice.org-java-common may be rather broad.)


Yes, extension dependencies are currently only able to express 
dependencies on a complete LO installation.  Dependencies that are 
not fulfilled because only a subset of LO functionality is installed 
are not supported.  (And note that what those available subsets are 
is typically also specific to each LO distribution, even if the 
optional module structure in scp2 sets some common ground.)


OK. I have put a warning about sudo apt-get install 
libreoffice-java-common on the extension's download page.
The error caused by the missing dependency was fairly serious; it 
caused my Ubuntu-inside-VirtualBox installation to completely freeze 
in some cases.


Best regards,

Christophe


--
Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/
Twitter: @RabelaisA11y
---
Open source for accessibility: results from the AEGIS project 
www.aegis-project.eu

---
Please don't invite me to Facebook, Quechup or other social 
networks. You may have agreed to their privacy policy, but I haven't.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-15 Thread Stephan Bergmann

On 11/15/2011 04:53 PM, Christophe Strobbe wrote:

Ah, yes. I was hoping to find some information on the Others item in
the list of child elements at
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Description_of_XML_Elements#Element_.2Fdescription.2Fdependencies.
My hope got the better of my XML knowledge :-(


How the information about dependencies is organized in the DevGuide is 
indeed not very user friendly...



OK. I have put a warning about sudo apt-get install
libreoffice-java-common on the extension's download page.
The error caused by the missing dependency was fairly serious; it caused
my Ubuntu-inside-VirtualBox installation to completely freeze in some
cases.


So it froze up when it displayed that inscrutable 
(com.sun.star.deployment.DeploymentException) ... dialog?


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-15 Thread Christophe Strobbe

Hi Stephan,

At 17:18 15-11-2011, Stephan Bergmann wrote:

On 11/15/2011 04:53 PM, Christophe Strobbe wrote:
(...)

OK. I have put a warning about sudo apt-get install
libreoffice-java-common on the extension's download page.
The error caused by the missing dependency was fairly serious; it caused
my Ubuntu-inside-VirtualBox installation to completely freeze in some
cases.


So it froze up when it displayed that inscrutable 
(com.sun.star.deployment.DeploymentException) ... dialog?


Actually, the first times I tried to install the extension, I got an 
empty error dialog (I assumed it was an error dialog), and the system froze.
More recently, I tried a more recent version of the extension, and 
this time I got the error dialog with the puzzling 
DeploymentException. I opened a command line and did ps -ax and 
killed one of the processes (I can't remember which one). However, 
this only worked because I had not wasted time copying the text in a 
text editor - which is what I did the first time. Apparently, it was 
important to kill the process that spawned the error dialog before it 
froze up the complete OS.


This all happened in LibreOffice 3.3.4 [OOO330m19 (Build:401)] on 
Ubuntu 11.04 (Natty Narwhal) inside VirtualBox.


Best regards,

Christophe


--
Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/
Twitter: @RabelaisA11y
---
Open source for accessibility: results from the AEGIS project 
www.aegis-project.eu

---
Please don't invite me to Facebook, Quechup or other social 
networks. You may have agreed to their privacy policy, but I haven't.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-15 Thread Stephan Bergmann

On 11/15/2011 05:33 PM, Christophe Strobbe wrote:

Actually, the first times I tried to install the extension, I got an
empty error dialog (I assumed it was an error dialog), and the system
froze.
More recently, I tried a more recent version of the extension, and this
time I got the error dialog with the puzzling DeploymentException. I
opened a command line and did ps -ax and killed one of the processes
(I can't remember which one). However, this only worked because I had
not wasted time copying the text in a text editor - which is what I did
the first time. Apparently, it was important to kill the process that
spawned the error dialog before it froze up the complete OS.

This all happened in LibreOffice 3.3.4 [OOO330m19 (Build:401)] on Ubuntu
11.04 (Natty Narwhal) inside VirtualBox.


Cannot reproduce this with current master-towards-3.5 build on Fedora 15 
x86_64:  Built the active.oxt from desktop/test/deployment/active (that 
contains a Java component that needs active Java registration during 
extension deployment) and removed ure/share/java/ridl.jar from the LO 
installation set.  Both soffice active.oxt and unopkg gui active.oxt 
display an error dialog but do not freeze.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-10 Thread Cor Nouws

Hi Stephan,


So, I think I will just introduce a new LibreOffice-minimal-version
dependency after all.


I hand this subject in my mind for some time. Simply because I provide 
some extensions that now have a OpenOffice.org-minimal-version value and 
I was wondering how long that will last.


a. I agree with your analyses that a simple solution is sufficient.
b. Will it be necessary with the new LibreOffice-minimal-version 
dependency to have separate extensions for LibreOffice and OpenOffice or 
will that be optional?


Cheers,

--
 - Cor
 - http://nl.libreoffice.org

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-10 Thread Stephan Bergmann

On 11/10/2011 12:24 PM, Cor Nouws wrote:

b. Will it be necessary with the new LibreOffice-minimal-version
dependency to have separate extensions for LibreOffice and OpenOffice or
will that be optional?


As long as a given extension works fine with both LO and OOo, there's no 
need to add a LibreOffice-minimal-version dependency to the extension at 
all.  An already existing OpenOffice.org-minimal-version (if one is 
needed at all) will still suffice.


And when the extension uses features only available in LO (and thus 
needs a LibreOffice-minimal-version dependency), that extension will not 
work in OOo anyway.


;)

Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-09 Thread Stephan Bergmann

On 11/04/2011 01:33 PM, Eike Rathke wrote:

On Friday, 2011-11-04 13:02:02 +0100, Thorsten Behrens wrote:

I'd tend to give the fine-grained dependencies a try.


That won't work in practice, unless those can be
(semi-)automatically generated. Experience shows that all
programmers are lazy, and seldomly go extra miles.


Seconded, but some do, if it's achievable without a hyper-duper
incomprehensible framework.. Would it be possible to have both, a simple
version dependency, and if fine grained dependencies are present use
those as well?


Not sure if that's not starting to become overengineered, then.  The 
past has shown that most extension writers (even including core 
developers from inside HH that would have benefited from short and 
direct communication channels) are rather happy with quick and dirty 
dependencies (in some cases, it even looks like they are simply copied 
over from some other extension blueprint), so---if both a coarse grained 
and fine grained dependencies were available---would probably only 
bother to use the coarse grained, anyway.


Its true that this past experience looks counter to my enthusiasm to 
give the fine-grained dependencies a try---maybe I was too enthusiastic 
indeed.  Its also true that some mechanism to mechanically compute 
fine-grained dependencies for a given extension would be helpful, but 
I'm not sure the work is worth it.  (But volunteers are surely welcome!)


The good thing about those dependencies is that we could in principle 
wait until some extension developer expresses demand for one, either 
fine or coarse grained, and only then implement it.  Again in practice, 
however, that's not how it has turned out to work.  Extension developers 
make use of the dependencies they find available and rarely bother to 
ask for additional ones.  (And I don't blame them; this is surely 
tedious stuff where everybody is happy taking the easy way out.)


So, I think I will just introduce a new LibreOffice-minimal-version 
dependency after all.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-04 Thread Thorsten Behrens
Stephan Bergmann wrote:
 As already mentioned briefly in my talk at LOCon, we need to make up
 our mind how to handle LO extension dependencies.
 
Skipping most of this -

 I'd tend to give the fine-grained dependencies a try.

That won't work in practice, unless those can be
(semi-)automatically generated. Experience shows that all
programmers are lazy, and seldomly go extra miles.

Having a simple version string, and some volunteers testing uploaded
extensions on the extension repo sounds much more workable - and
useful in practice, since no syntactic compatibility one could come
up with would ensure semantic equality...

Cheers,

-- Thorsten


pgp8m7dzjiqVo.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-04 Thread Eike Rathke
Hi,

On Friday, 2011-11-04 13:02:02 +0100, Thorsten Behrens wrote:

  I'd tend to give the fine-grained dependencies a try.
 
 That won't work in practice, unless those can be
 (semi-)automatically generated. Experience shows that all
 programmers are lazy, and seldomly go extra miles.

Seconded, but some do, if it's achievable without a hyper-duper
incomprehensible framework.. Would it be possible to have both, a simple
version dependency, and if fine grained dependencies are present use
those as well?

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD


pgpnxb0QokUGv.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Extension dependencies

2011-11-04 Thread Christophe Strobbe


At 13:02 4-11-2011, Thorsten Behrens wrote:

Stephan Bergmann wrote:
 As already mentioned briefly in my talk at LOCon, we need to make up
 our mind how to handle LO extension dependencies.

Skipping most of this -

 I'd tend to give the fine-grained dependencies a try.

That won't work in practice, unless those can be
(semi-)automatically generated. Experience shows that all
programmers are lazy, and seldomly go extra miles.


And all generalisations are true ;-)
Even those who would be willing to use fine-grained metadata
for dependencies would benefit from an automated check on these
data. It is easy to modify the source code in the extension and
then to forget to update the dependency metadata.

Best regards,

Christophe




Having a simple version string, and some volunteers testing uploaded
extensions on the extension repo sounds much more workable - and
useful in practice, since no syntactic compatibility one could come
up with would ensure semantic equality...

Cheers,

-- Thorsten



--
Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/
Twitter: @RabelaisA11y
---
Open source for accessibility: results from the AEGIS project 
www.aegis-project.eu

---
Please don't invite me to Facebook, Quechup or other social 
networks. You may have agreed to their privacy policy, but I haven't.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice