Re: [Scilab-users] Update library and help

2021-02-01 Thread Jean-Yves Baudais

Le 30/01/2021 à 15:42, Samuel Gougeon a écrit :

Thanks Philipp,
Now i can answer inside the recovered thread:

Jean-Yves, i remember -- from another thread -- that you are running all 
this with Scilab 5.5.2. Aren't you?



Yes I am. I also did tests on Scilab 6.1.0, but not on my computer.
Well, for more than 6 years that 5.5.2 was released, a lot of things 
were done, noticeably about fixing some help_from_sci bugs.

Have you checked fixed bugs? If you installed uman,
--> uman help_from_sci b 




I didn't see any corresponding bug report. Anyway, I will first update 
my numerical environment (OS, tools, own libraries...) as soon as 
possible and comeback if needed.


Thanks,

--Jean-Yves
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Update library and help

2021-01-30 Thread Samuel Gougeon

Thanks Philipp,
Now i can answer inside the recovered thread:

Jean-Yves, i remember -- from another thread -- that you are running all 
this with Scilab 5.5.2. Aren't you?


Le 29/01/2021 à 18:47, Jean-Yves Baudais a écrit :

.../...
Well, I did new test with a simple function in home+"/macros"

function out=testadd(a,b)
   // To test process for lib
   //
   // Syntax
   //  out=testlib(a,b)
   // Parameters
   //  a: scalar
   //  b: scalar
   // Description
   //  Add to scalar
   // Author
   //  Me
   // Bibliography
   //  Nothing
   out=a+b;
endfunction

and I generate the lib "testlib". Contrary to what I wrote, that works fine. I 
did mistake when I used clear. It must be
--> clear testlib testadd
and not
--> clear testlib, testadd
(testadd should also be cleared if it has been called, because 
load("macros/lib") is not enough to replace the function already loaded in 
Scilab memory, I guess)

So, there is no problem with the updated library though the load is fisrtly done in 
.scilab. I don't need to restart Scilab to use the updated library "testlib".

The problem still remains for the help:

--> help_from_sci("macros","help/gl_GL")
help_from_sci: Reading from directory macros
help_from_sci: Processing of file: macros/testadd to help/gl_GL/testadd
help_from_sci: processed 1 files.
ans  =
""


Well, for more than 6 years that 5.5.2 was released, a lot of things 
were done, noticeably about fixing some help_from_sci bugs.

Have you checked fixed bugs? If you installed uman,
--> uman help_from_sci b 



If the issue is not among the fixed ones, you might send your .sci file 
to me by private email if you prefer, in order to reproduce the issue. 
Or report on bugzilla, with an attachment.
By the way, why don't you edit and work directly with the xml file, 
instead of through the .sci header + help_from_sci?
Notepad++ with its XML add-on is really nice to do that, and working 
with the xml allows much more things than from the heading comments 
(noticeably globish multilinguism :-).


Samuel


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Update library and help

2021-01-29 Thread Jean-Yves Baudais
Hello,

Thanks for the message.

- Original Message -
> Do you get any error message that tells that this line is KO while by default
> other ones are OK?
> Please note that the compilation of the documentation can (quite often) yield
> some errors that are [ http://bugzilla.scilab.org/7255 | NOT displayed in the
>Scilab console ] (but, on Windows, in the so-called consolebox()).
> After such "silent" errors, some involved files [
> http://bugzilla.scilab.org/8430 | can
>stay locked ] (or simply not updated), and next instructions might 
> look as
>failing.

I saw that some messages are written on XTERM and not on Scilab window.

Well, I did new test with a simple function in home+"/macros"

function out=testadd(a,b)
  // To test process for lib
  //
  // Syntax
  //  out=testlib(a,b)
  // Parameters
  //  a: scalar
  //  b: scalar
  // Description
  //  Add to scalar
  // Author
  //  Me
  // Bibliography
  //  Nothing
  out=a+b;
endfunction

and I generate the lib "testlib". Contrary to what I wrote, that works fine. I 
did mistake when I used clear. It must be
--> clear testlib testadd
and not
--> clear testlib, testadd
(testadd should also be cleared if it has been called, because 
load("macros/lib") is not enough to replace the function already loaded in 
Scilab memory, I guess)

So, there is no problem with the updated library though the load is fisrtly 
done in .scilab. I don't need to restart Scilab to use the updated library 
"testlib".

The problem still remains for the help:

--> help_from_sci("macros","help/gl_GL")
help_from_sci: Reading from directory macros
help_from_sci: Processing of file: macros/testadd to help/gl_GL/testadd
help_from_sci: processed 1 files.
ans  =
""

Of course I created the help/gl_GL directory before, otherwise there is an 
error, and testadd.xml is created (gl is for globish, english is out of my 
reach)

--> xmltojar("help/gl_GL","My test lib","gl_GL")

jar/scilab_gl_GL_help.jar is udpated, and there is also a message in the linux 
XTERM with the number of generated files.

--> add_help_chapter("My test lib","jar")
T

--> help

The chapter "My test lib" is in the help window with the function testadd.

--> del_help_chapter("My test lib")
--> help

The chapter is not in the help, as expected.

--> add_help_chapter("My test lib","jar")
T

I change the head comment and rebuilt the help:

--> help_from_sci("macros","help/gl_GL")

a warning mentions that the file exists, but I choose "create anyway"

--> xmltojar("help/gl_GL","My test lib","gl_GL")

the files are updated

--> help
Could not load file: /home/jbaudais/jar/scilab_gl_GL_help.jar. Please check its 
contents, must be a Java Help file.
Error message: Could not parse
Got an IOException (JAR entry scilab_gl_GL_help/jhelpset.hs not found in 
/home/jbaudais/jar/scilab_gl_GL_help.jar)
Parsing failed for null

However, I can open the file "jhelpset.hs", so the message is wrong, the entry 
"scilab_gl_GL_help/jhelpset.hs" exists in the file 
"/home/jbaudais/jar/scilab_gl_GL_help.jar", on the filesystem of course, but 
Scilab use its memory (stack, heap?) and not the filesystem. Maybe the 
"scilab_gl_GL_help.jar" is corrupted by xmltojar on the Scilab memory. What do 
you think?


I try 
--> del_help_chapter("My test lib")

before modification, and

--> add_help_chapter("My test lib","jar")

but that change nothing. I must restart scilab and

--> add_help_chapter("My test lib","jar")
--> help

it works fine. 

So, I have no solution to rebuilt the help without Scilab restart, from 
scratch! I think the corresponding Scilab memory is not correctly updated or is 
corrupted somewhere (xmltojar, add_help_chapter?), so we must restart Scilab. 
Do you have the same behaviour?

-- Jean-Yves

PS : I read the discussion about profile and did test. Is there similar tool to 
check memory within Scilab, or do we need to use external tools as valgrind?
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Update library and help

2021-01-28 Thread P M
Hello Jean-Yves,

please let me forward Samuel Gougeon's answer to your question.

Best Regards,

Philipp


Hello Jean-Yves,

Jan 18, 2021; 2:54pm jbaudais[Scilab-users] Update library and help
Hello,

   When I modify the file myfunction.sci in my librairie "mylib", the
update works as expected when I restard Scilab with the following lines
in my .scilab file

genlib(SCIHOME+"/mylib/macros")
load(SCIHOME+"/mylib/macros/lib")
add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")

I would like to do the update without Scilab exit and restart, so I do

--> del_help_chapter("Librairie perso")
--> clear mylib myfunction
--> genlib(SCIHOME+"/mylib/macros")
-->
help_from_sci(SCIHOME+"/mylib/macros/myfunction.sci",SCIHOME+"/mylib/help/fr_FR");
--> xmltojar(SCIHOME"/mylib/help/fr_FR","Librairie perso","fr_FR");
--> load(SCIHOME+"/mylib/macros/lib")
--> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")

Excepted genlib and xmltojar, not all the code lines work all the time
(some time yes and some time no).

Do you get any error message that tells that this line is KO while by
default other ones are OK?
Please note that the compilation of the documentation can (quite often)
yield some errors that are NOT displayed in the Scilab console
<http://bugzilla.scilab.org/7255> (but, on Windows, in the so-called
consolebox()).
After such "silent" errors, some involved files can stay locked
<http://bugzilla.scilab.org/8430> (or simply not updated), and next
instructions might look as failing.


I understand nothing because I not
able to reproduce "deterministically" the success, or not! So I think my
code is wrong.

On Windows, displaying the consolebox("on") when compiling some
documentation is the best and only way i know to see where are the problems
and fix them in source files. Without this, we blindly work.
I hope this helps.
Best regards
Samuel Gougeon

PS: Thanks to Philipp for forwarding this answer without breaking the
thread.

--

Am Mo., 18. Jan. 2021 um 14:55 Uhr schrieb Jean-Yves Baudais <
jean-yves.baud...@insa-rennes.fr>:

> Hello,
>
>When I modify the file myfunction.sci in my librairie "mylib", the
> update works as expected when I restard Scilab with the following lines
> in my .scilab file
>
> genlib(SCIHOME+"/mylib/macros")
> load(SCIHOME+"/mylib/macros/lib")
> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")
>
> I would like to do the update without Scilab exit and restart, so I do
>
> --> del_help_chapter("Librairie perso")
> --> clear mylib myfunction
> --> genlib(SCIHOME+"/mylib/macros")
> -->
>
> help_from_sci(SCIHOME+"/mylib/macros/myfunction.sci",SCIHOME+"/mylib/help/fr_FR");
> --> xmltojar(SCIHOME"/mylib/help/fr_FR","Librairie perso","fr_FR");
> --> load(SCIHOME+"/mylib/macros/lib")
> --> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")
>
> Excepted genlib and xmltojar, not all the code lines work all the time
> (some time yes and some time no). I understand nothing because I not
> able to reproduce "deterministically" the success, or not! So I think my
> code is wrong.
>
> What is the good code to update library and help after changing a file?
>
> --
> Jean-Yves Baudais
>
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Update library and help

2021-01-18 Thread Jean-Yves Baudais

Hello,

  When I modify the file myfunction.sci in my librairie "mylib", the 
update works as expected when I restard Scilab with the following lines 
in my .scilab file


genlib(SCIHOME+"/mylib/macros")
load(SCIHOME+"/mylib/macros/lib")
add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")

I would like to do the update without Scilab exit and restart, so I do

--> del_help_chapter("Librairie perso")
--> clear mylib myfunction
--> genlib(SCIHOME+"/mylib/macros")
--> 
help_from_sci(SCIHOME+"/mylib/macros/myfunction.sci",SCIHOME+"/mylib/help/fr_FR");

--> xmltojar(SCIHOME"/mylib/help/fr_FR","Librairie perso","fr_FR");
--> load(SCIHOME+"/mylib/macros/lib")
--> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")

Excepted genlib and xmltojar, not all the code lines work all the time 
(some time yes and some time no). I understand nothing because I not 
able to reproduce "deterministically" the success, or not! So I think my 
code is wrong.


What is the good code to update library and help after changing a file?

--
Jean-Yves Baudais

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users