Bug 154426 (Base-Without-Java) - [META] Steps to work with Base without needing Java
Summary: [META] Steps to work with Base without needing Java
Status: NEW
Alias: Base-Without-Java
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: Database-Firebird-Default 105220 112491 116936 124054 126178 151250 104918 117118 130345 151249
Blocks: Mac-AppStore, MacOS-Vanilla
  Show dependency treegraph
 
Reported: 2023-03-28 13:54 UTC by Robert Großkopf
Modified: 2023-08-14 09:17 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2023-03-28 13:54:10 UTC
There are different places special in Base, which will need Java:
1. Internal HSQLDB
→ there is a second internal DB Firebird, but it won't offer the same integration in GUI as HSQLDB does
2. Wizards integrated in Base
→ without Java no wizard integrated in Base will work, see bug 151250.
3. Report Builder
→ Main code for Report Builder is written in Java. There is only a very old legacy report generator available, which will appear without Report Builder installed.

Java seems to be a problem for MacOS. Also many people have problems to install the right JRE for other systems to get Base working.

We will get a way to remove Java and get Base working well without Java.
As described in the steps: 1. Step is first thing to do: Firebird has to work, then the wizards and at last the Report Builder.

This bug should help to collect different bugs and to vote which bugs will be the main bugs to solve.
Comment 1 Dennis Roczek 2023-03-28 15:51:11 UTC
Plus: Java is not working in the Apple AppStore version --> we need either to remove base in the app store version or replace the parts.
Comment 2 Julien Nabet 2023-04-30 06:58:44 UTC
Robert: I don't see the interest of this meta considering:
1) you only list Firebird bugs whereas there's already tdf#116968 (that you already used here)
2) there's already https://bugs.documentfoundation.org/show_bug.cgi?id=51780
3) the last referenced ones correspond to https://bugs.documentfoundation.org/show_bug.cgi?id=127278 "BASE reports and wizards still require Java" but finally if we sum up we need only:
- migrate to Firebird as default DB
- migrate wizard (to Python or ideally C++)
so creating a meta for just referencing 2 bugs/enhancements at the end is not very useful unless I miss something?
Comment 3 Robert Großkopf 2023-04-30 07:44:43 UTC
(In reply to Julien Nabet from comment #2)
> Robert: I don't see the interest of this meta considering:
> 1) you only list Firebird bugs whereas there's already tdf#116968 (that you
> already used here)
> 2) there's already https://bugs.documentfoundation.org/show_bug.cgi?id=51780
> 3) the last referenced ones correspond to
> https://bugs.documentfoundation.org/show_bug.cgi?id=127278 "BASE reports and
> wizards still require Java" but finally if we sum up we need only:
> - migrate to Firebird as default DB
> - migrate wizard (to Python or ideally C++)
> so creating a meta for just referencing 2 bugs/enhancements at the end is
> not very useful unless I miss something?

I'm missing to vote for bugs. There are many bugs for Firebird. We need to get it working like it should to change from HSQLDB to Firebird without hiding Firebird as experimental. This meta bug shouldn't collect all Firebird bugs, but should show the bugs, which had to be fixed to set Firebird to the database we will prefer.
tdf#116968 is about migrating form HSQLDB to Firebird, not only for working with Firebird without knowing anything about HSQLDB.
tdf#51780 will show too much bugs, which aren't bugs we need to fix before changing to Firebird.
Comment 4 Julien Nabet 2023-04-30 08:20:51 UTC
(In reply to Robert Großkopf from comment #3)
> (In reply to Julien Nabet from comment #2)
> > Robert: I don't see the interest of this meta considering:
> > 1) you only list Firebird bugs whereas there's already tdf#116968 (that you
> > already used here)
> > 2) there's already https://bugs.documentfoundation.org/show_bug.cgi?id=51780
> > 3) the last referenced ones correspond to
> > https://bugs.documentfoundation.org/show_bug.cgi?id=127278 "BASE reports and
> > wizards still require Java" but finally if we sum up we need only:
> > - migrate to Firebird as default DB
> > - migrate wizard (to Python or ideally C++)
> > so creating a meta for just referencing 2 bugs/enhancements at the end is
> > not very useful unless I miss something?
> 
> I'm missing to vote for bugs. There are many bugs for Firebird. We need to
> get it working like it should to change from HSQLDB to Firebird without
> hiding Firebird as experimental. This meta bug shouldn't collect all
> Firebird bugs, but should show the bugs, which had to be fixed to set
> Firebird to the database we will prefer.
The description you give "bugs to be fixed to set Firebird to the database we will prefer" is not the same as "Steps to work with Base without needing Java", the first one seems to correspond to tdf#51780.

> tdf#116968 is about migrating form HSQLDB to Firebird, not only for working
> with Firebird without knowing anything about HSQLDB.
You're right, my mistake here, it's the migration specific process, I've changed some bugs to point towards tdf#51780 instead of tdf#116968

> tdf#51780 will show too much bugs, which aren't bugs we need to fix before
> changing to Firebird.
I suppose some bugs are more important than others but we may set the importance on each bug. Then if we consider the most important are fixed, we can remove experimental.

Remark: Personnally, I don't understand the interest of having so much META bugs in general, taking a look at https://bugs.documentfoundation.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&limit=0&list_id=1593087&order=bug_id%20DESC&product=LibreOffice&query_format=advanced&short_desc=META&short_desc_type=allwordssubstr, there are now more than 900 whereas we can just use SEARCH or "See also" function to find bugs related. So let's say 800/850 bugs which clutter the bugtracker if we consider 50/100 are really relevant.
Comment 5 Dennis Roczek 2023-05-05 13:36:55 UTC
(In reply to Julien Nabet from comment #4)
> Remark: Personnally, I don't understand the interest of having so much META
> bugs in general, taking a look at
...


Well, the TDF uses META bugs for their tenders. ;-)
Comment 6 prrvchr 2023-07-29 02:16:14 UTC
> - migrate wizard (to Python or ideally C++)

If the assistant must be rewritten in python then I want to stick to it, on the other hand for C I don't have the capacity...
Comment 7 Julien Nabet 2023-07-29 08:36:10 UTC
(In reply to prrvchr from comment #6)
> > - migrate wizard (to Python or ideally C++)
> 
> If the assistant must be rewritten in python then I want to stick to it, on
> the other hand for C I don't have the capacity...

LO is in C++ at about 90-95%. There's some Python, Java, C, Assembly, Perl, Objective-C (for some macOS part).
So coding in C++ has the advantage to be native. Moreover, C++ is fast (about as fast as C) and we can debug it more easily (with gdb).

Now for a wizard, being able to debug it with gdb is useful but there's not a great need for speed and I suppose we can still debug Python with some printf so go ahead with Python, it's always better than being stuck with Java and after all it could be a first step towards C++ ! :-)
Comment 8 prrvchr 2023-08-12 14:56:24 UTC
(In reply to Julien Nabet from comment #7)
> 
> Now for a wizard, being able to debug it with gdb is useful but there's not
> a great need for speed and I suppose we can still debug Python with some
> printf so go ahead with Python, it's always better than being stuck with
> Java and after all it could be a first step towards C++ ! :-)

I'm a little late, I hadn't seen the answer...
Where are these wizards?
Comment 9 Julien Nabet 2023-08-12 15:38:51 UTC
(In reply to prrvchr from comment #8)
> (In reply to Julien Nabet from comment #7)
> > 
> > Now for a wizard, being able to debug it with gdb is useful but there's not
> > a great need for speed and I suppose we can still debug Python with some
> > printf so go ahead with Python, it's always better than being stuck with
> > Java and after all it could be a first step towards C++ ! :-)
> 
> I'm a little late, I hadn't seen the answer...
> Where are these wizards?

in <core>/wizards, see https://opengrok.libreoffice.org/xref/core/wizards/README.md?r=ea5641ba 
(all subdirs don't concern Base)

A big chunk concerning Base is also https://opengrok.libreoffice.org/xref/core/reportbuilder/
Comment 10 prrvchr 2023-08-13 12:22:56 UTC
(In reply to Julien Nabet from comment #9)
> 
> in <core>/wizards, see
> https://opengrok.libreoffice.org/xref/core/wizards/README.md?r=ea5641ba 
> (all subdirs don't concern Base)

I think I'll start looking in there:
https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/table/TableWizard.java?r=380550fb
https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java?r=2b383d19
https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/ui/WizardDialog.java?r=05d5b669

This seems to me to be the parent class of the Wizard allowing to create a table in Base?

Can we consider that the WizardDialog.py file is the rewrite of the WizardDialog.java file in the directory:
https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/ui/
And therefore, will be the starting point.

What are the rules, if any, for rewriting from Java to Python?

Thanks.
Comment 11 Julien Nabet 2023-08-14 07:26:43 UTC
(In reply to prrvchr from comment #10)
> (In reply to Julien Nabet from comment #9)
> > 
> > in <core>/wizards, see
> > https://opengrok.libreoffice.org/xref/core/wizards/README.md?r=ea5641ba 
> > (all subdirs don't concern Base)
> 
> I think I'll start looking in there:
> https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/
> table/TableWizard.java?r=380550fb
> https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/db/
> DatabaseObjectWizard.java?r=2b383d19
> https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/ui/
> WizardDialog.java?r=05d5b669
> 
> This seems to me to be the parent class of the Wizard allowing to create a
> table in Base?
Sorry, no idea.

> 
> Can we consider that the WizardDialog.py file is the rewrite of the
> WizardDialog.java file in the directory:
> https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/ui/
> And therefore, will be the starting point.
> 
> What are the rules, if any, for rewriting from Java to Python?
No idea too :-(

Xisco: taking a look at git history of <core>/wizards/com/sun/star/wizards/ui/WizardDialog.py, I saw you had done the migration.
Would you have some info here? What Java part in Base is the most advanced in the conversion Java->Python?
Comment 12 Xisco Faulí 2023-08-14 08:25:57 UTC
(In reply to Julien Nabet from comment #11)
> (In reply to prrvchr from comment #10)
> > (In reply to Julien Nabet from comment #9)
> > > 
> > > in <core>/wizards, see
> > > https://opengrok.libreoffice.org/xref/core/wizards/README.md?r=ea5641ba 
> > > (all subdirs don't concern Base)
> > 
> > I think I'll start looking in there:
> > https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/
> > table/TableWizard.java?r=380550fb
> > https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/db/
> > DatabaseObjectWizard.java?r=2b383d19
> > https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/ui/
> > WizardDialog.java?r=05d5b669
> > 
> > This seems to me to be the parent class of the Wizard allowing to create a
> > table in Base?
> Sorry, no idea.
> 
> > 
> > Can we consider that the WizardDialog.py file is the rewrite of the
> > WizardDialog.java file in the directory:
> > https://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/ui/
> > And therefore, will be the starting point.
> > 
> > What are the rules, if any, for rewriting from Java to Python?
> No idea too :-(
> 
> Xisco: taking a look at git history of
> <core>/wizards/com/sun/star/wizards/ui/WizardDialog.py, I saw you had done
> the migration.
> Would you have some info here? What Java part in Base is the most advanced
> in the conversion Java->Python?

Those wizards are in Writer ( File - Wizards ) so nothing in Base has been converted to python as far as I know
Comment 13 prrvchr 2023-08-14 08:28:55 UTC
I don't know if bug 132666 will bring us back to the same files, but if so, it would be worth taking it into consideration.
Comment 14 Julien Nabet 2023-08-14 09:17:14 UTC
(In reply to Xisco Faulí from comment #12)
> ...
> Those wizards are in Writer ( File - Wizards ) so nothing in Base has been
> converted to python as far as I know

Thank you for the quick feedback. Do you think you may add some info in wizards/README.md ?
I'm wondering too if it could be interesting to have something like:
wizards/source/writer, wizards/source/base, wizards/source/common