Re: Hashing without relying on Qt?

2021-10-18 Thread Richard Kimberly Heck

On 10/18/21 20:37, Thibaut Cuvelier wrote:

Thank you Pavel and Riki for your feedback!

Here is a refactoring of this code. As a result, the execution should 
be a tad slower: sanitizeFileName performs a copy of the string 
(instead of mutating its argument), while the original version did 
not, but it's only for file names, so it should not matter much 
(especially as the calling code would not be too strange).


Is the code OK to push as is?


Looks good to me.

Riki




On Mon, 18 Oct 2021 at 15:33, Pavel Sanda  wrote:

On Sun, Oct 17, 2021 at 12:09:06AM -0400, Richard Kimberly Heck wrote:
> >The only solution I found without importing a large new
dependency into
> >LyX was to use Qt's QCryptographicHash, just like
support/FileName.cpp. I
> >know that LyX tries to have clear boundaries for dependencies,
that's why
> >I'm bringing the question to the list. Is the current solution
acceptable?
> >Maybe move some of the code to support/FileName.cpp?

QCryptographicHash in FileName.cpp is probably my doing and you
are right,
that it would be better to abstract qt hasing somewhere into
support and
then use it in FileName & Insettext.

Pavel
-- 
lyx-devel mailing list

lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Hashing without relying on Qt?

2021-10-18 Thread Thibaut Cuvelier
Thank you Pavel and Riki for your feedback!

Here is a refactoring of this code. As a result, the execution should be a
tad slower: sanitizeFileName performs a copy of the string (instead of
mutating its argument), while the original version did not, but it's only
for file names, so it should not matter much (especially as the calling
code would not be too strange).

Is the code OK to push as is?

On Mon, 18 Oct 2021 at 15:33, Pavel Sanda  wrote:

> On Sun, Oct 17, 2021 at 12:09:06AM -0400, Richard Kimberly Heck wrote:
> > >The only solution I found without importing a large new dependency into
> > >LyX was to use Qt's QCryptographicHash, just like support/FileName.cpp.
> I
> > >know that LyX tries to have clear boundaries for dependencies, that's
> why
> > >I'm bringing the question to the list. Is the current solution
> acceptable?
> > >Maybe move some of the code to support/FileName.cpp?
>
> QCryptographicHash in FileName.cpp is probably my doing and you are right,
> that it would be better to abstract qt hasing somewhere into support and
> then use it in FileName & Insettext.
>
> Pavel
> --
> lyx-devel mailing list
> lyx-devel@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-devel
>


0003-DocBook-use-the-new-refactorings-in-InsetText.patch
Description: Binary data


0001-Refactor-computing-hashes.patch
Description: Binary data


0002-Refactor-file-name-sanitisation.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Hashing without relying on Qt?

2021-10-18 Thread Pavel Sanda
On Sun, Oct 17, 2021 at 12:09:06AM -0400, Richard Kimberly Heck wrote:
> >The only solution I found without importing a large new dependency into
> >LyX was to use Qt's QCryptographicHash, just like support/FileName.cpp. I
> >know that LyX tries to have clear boundaries for dependencies, that's why
> >I'm bringing the question to the list. Is the current solution acceptable?
> >Maybe move some of the code to support/FileName.cpp?

QCryptographicHash in FileName.cpp is probably my doing and you are right,
that it would be better to abstract qt hasing somewhere into support and
then use it in FileName & Insettext.

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Makefile in po

2021-10-18 Thread Jean-Pierre Chrétien

Le 18/10/2021 à 13:55, Jean-Marc Lasgouttes a écrit :

Le 18/10/2021 à 12:12, Jean-Pierre Chrétien a écrit :

Le 18/10/2021 à 11:46, Jean-Marc Lasgouttes a écrit :

Le 18/10/2021 à 10:53, Jean-Pierre Chrétien a écrit :

Hello

The files Makefile disappeared from the po directory, both in master and 2.3.x.
I need them to remerge strings.
I ran ./autogen.sh with no success.
what's wrong here ?



Hi Jean-Pierre,

Did you run ./configure too?


Sure, lyx compiles fine in both cases. Bot po contains only

Makefile.in.in Makevars   Makevars.template




Towards the end of the configure run, I see:

config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile

Don't you see that?


Sure.

Stupid of me, I was looking for Makefile in master/po, not in /po.

Sorry for the noise.

--
Jean-Pierre


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Makefile in po

2021-10-18 Thread Jean-Marc Lasgouttes

Le 18/10/2021 à 12:12, Jean-Pierre Chrétien a écrit :

Le 18/10/2021 à 11:46, Jean-Marc Lasgouttes a écrit :

Le 18/10/2021 à 10:53, Jean-Pierre Chrétien a écrit :

Hello

The files Makefile disappeared from the po directory, both in master 
and 2.3.x.

I need them to remerge strings.
I ran ./autogen.sh with no success.
what's wrong here ?



Hi Jean-Pierre,

Did you run ./configure too?


Sure, lyx compiles fine in both cases. Bot po contains only

Makefile.in.in Makevars   Makevars.template




Towards the end of the configure run, I see:

config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile

Don't you see that?

JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: DeprecationWarning when installing master

2021-10-18 Thread Jean-Pierre Chrétien

Le 18/10/2021 à 13:22, Jean-Pierre Chrétien a écrit :

Dear developers

I get this :

$ sudo make install-strip >>make.log
-c:2: DeprecationWarning: the imp module is deprecated in favour of importlib; 
see the module's documentation for alternative uses




With some context :

 /usr/bin/install -c -m 644 ../../../master/lib/lyx2lyx/lyx2lyx 
lyx2lyx_version.py ../../../master/lib/lyx2lyx/lyx2lyx_lang.py 
../../../master/lib/lyx2lyx/generate_encoding_info.py 
../../../master/lib/lyx2lyx/parser_tools.py 
../../../master/lib/lyx2lyx/lyx2lyx_tools.py 
../../../master/lib/lyx2lyx/unicode_symbols.py 
../../../master/lib/lyx2lyx/LyX.py ../../../master/lib/lyx2lyx/lyx_0_06.py 
../../../master/lib/lyx2lyx/lyx_0_08.py ../../../master/lib/lyx2lyx/lyx_0_10.py 
../../../master/lib/lyx2lyx/lyx_0_12.py ../../../master/lib/lyx2lyx/lyx_1_0.py 
../../../master/lib/lyx2lyx/lyx_1_1.py ../../../master/lib/lyx2lyx/lyx_1_1_5.py 
../../../master/lib/lyx2lyx/lyx_1_1_6_0.py 
../../../master/lib/lyx2lyx/lyx_1_1_6_3.py 
../../../master/lib/lyx2lyx/lyx_1_2.py ../../../master/lib/lyx2lyx/lyx_1_3.py 
../../../master/lib/lyx2lyx/lyx_1_4.py ../../../master/lib/lyx2lyx/lyx_1_5.py 
../../../master/lib/lyx2lyx/lyx_1_6.py ../../../master/lib/lyx2lyx/lyx_2_0.py 
../../../master/lib/lyx2lyx/lyx_2_1.py ../../../master/lib/lyx2lyx/lyx_2_2.py 
../../../master/lib/lyx2lyx/lyx_2_3.py ../../../master/lib/lyx2lyx/lyx_2_4.py 
../../../master/lib/lyx2lyx/profiling.py 
../../../master/lib/lyx2lyx/test_parser_tools.py 
'/usr/local/share/lyx-2.4.0dev/lyx2lyx'
-c:2: DeprecationWarning: the imp module is deprecated in favour of importlib; 
see the module's documentation for alternative uses

Byte-compiling python modules...
lyx2lyx_version.pylyx2lyx_lang.pygenerate_encoding_info.pyparser_tools.pylyx2lyx_tools.pyunicode_symbols.pyLyX.pylyx_0_06.pylyx_0_08.pylyx_0_10.pylyx_0_12.pylyx_1_0.pylyx_1_1.pylyx_1_1_5.pylyx_1_1_6_0.pylyx_1_1_6_3.pylyx_1_2.pylyx_1_3.pylyx_1_4.pylyx_1_5.pylyx_1_6.pylyx_2_0.pylyx_2_1.pylyx_2_2.pylyx_2_3.pylyx_2_4.pyprofiling.pytest_parser_tools.py

--
Jean-Pierre



--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


DeprecationWarning when installing master

2021-10-18 Thread Jean-Pierre Chrétien

Dear developers

I get this :

$ sudo make install-strip >>make.log
-c:2: DeprecationWarning: the imp module is deprecated in favour of importlib; 
see the module's documentation for alternative uses


--
Regards
Jean-Pierre
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Makefile in po

2021-10-18 Thread Jean-Pierre Chrétien

Le 18/10/2021 à 11:46, Jean-Marc Lasgouttes a écrit :

Le 18/10/2021 à 10:53, Jean-Pierre Chrétien a écrit :

Hello

The files Makefile disappeared from the po directory, both in master and 2.3.x.
I need them to remerge strings.
I ran ./autogen.sh with no success.
what's wrong here ?



Hi Jean-Pierre,

Did you run ./configure too?


Sure, lyx compiles fine in both cases. Bot po contains only

Makefile.in.in Makevars   Makevars.template

--
Jean-Pierre

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Makefile in po

2021-10-18 Thread Jean-Marc Lasgouttes

Le 18/10/2021 à 10:53, Jean-Pierre Chrétien a écrit :

Hello

The files Makefile disappeared from the po directory, both in master and 
2.3.x.

I need them to remerge strings.
I ran ./autogen.sh with no success.
what's wrong here ?



Hi Jean-Pierre,

Did you run ./configure too?

JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Makefile in po

2021-10-18 Thread Jean-Pierre Chrétien

Hello

The files Makefile disappeared from the po directory, both in master and 2.3.x.
I need them to remerge strings.
I ran ./autogen.sh with no success.
what's wrong here ?

--
Jean-Pierre
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [PATCH] Re: Weird compile result -- bug?

2021-10-18 Thread Jürgen Spitzmüller
> Please go ahead.

Done.

Thanks,
Jürgen




signature.asc
Description: This is a digitally signed message part
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel