Re: guile-2.0

2012-12-18 Thread Geert Janssens

On 15-12-12 19:28, Geert Janssens wrote:

On 10-02-12 16:34, rbibr...@t-online.de wrote:


Starting gnucash within the console will result in a new compile process
for the guile files. Besides masses of warnings there are some errors
relating missing sw_*** files The lines (load-extension ..) in
file core-utils.scm, gnc-module.scm and qif-import.scm should be
replaced with (eval-when (compile load eval) (load-extension...)). In
file app-utils.scm it should read (eval-whwn (compile load eval)
(gnc:module-load gnucash/engine 0)).
One error in business-reports.scm remains : unbound variable:
gnc:menuname-business-reports which I do not understand??? But as long
gnucash does not use these compiled files it is not very relevant.

I still have to go into this, but again a very good starting point !
I have used your suggested changes, but wrapped them to only be used 
when running with guile 2.
For the remaining error in gnc:menuname-business-reports, I used the 
same trick which eliminates all autocompile errors.


I am ignoring the warnings for now. They are generated at autocompile 
time, but GnuCash works fine regardless.


Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: guile-2.0

2012-12-15 Thread Geert Janssens

On 10-02-12 16:34, rbibr...@t-online.de wrote:

-Original Message-
Date: Fri, 03 Feb 2012 15:40:17 +0100
Subject: Re: guile-2.0
From: rbibr...@t-online.de rbibr...@t-online.de
To: gnucash-devel@gnucash.org



according to the manual guile provides two types of hashtables one
abstract type and one vectorlike type. May be that mixing both types
was allowed in guile 1.8 but not longer in 2.0

In file html-style-info.scm a vector type table was created. The lines
for the abstract type are outcommented. May be that the hanging
hash-fold should be replaced by a construction similare to kvt-fold.???

Rudolf


In the file html-document.scm line 292 I have replaced hash-fold with
kvt-fold so that this line reads now:
  (if attr (kvt-fold add-attribute  #f attr))
The reports are working now!!
Obviously guile-2 has different sorts of hashtables.
Your suggestion about incompatible hashtable types was invaluable to get 
me past this crasher.


GnuCash was mixing a custom hash datatype (kvt-hash) with a guile proper 
hash type. Apparently in guile 1.8 the internal representation was 
compatible enough to get away with this. In guile 2 this obviously 
changed. I decided to fix it in the other direction though: I have 
thrown out our custom hash datatype. It was only used in one file and I 
couldn't see any obvious benefits in it.


Thanks a lot for guiding me in the right direction !

Starting gnucash within the console will result in a new compile process
for the guile files. Besides masses of warnings there are some errors
relating missing sw_*** files The lines (load-extension ..) in
file core-utils.scm, gnc-module.scm and qif-import.scm should be
replaced with (eval-when (compile load eval) (load-extension...)). In
file app-utils.scm it should read (eval-whwn (compile load eval)
(gnc:module-load gnucash/engine 0)).
One error in business-reports.scm remains : unbound variable:
gnc:menuname-business-reports which I do not understand??? But as long
gnucash does not use these compiled files it is not very relevant.

I still have to go into this, but again a very good starting point !

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: guile-2.0

2012-02-10 Thread Geert Janssens
Op vrijdag 10 februari 2012 16:34:00 schreef rbibr...@t-online.de:
 -Original Message-
 Date: Fri, 03 Feb 2012 15:40:17 +0100
 Subject: Re: guile-2.0
 From: rbibr...@t-online.de rbibr...@t-online.de
 To: gnucash-devel@gnucash.org
 
 
 -Original Message-
 Date: Fri, 03 Feb 2012 13:36:58 +0100
 Subject: Re: guile-2.0
 From: Geert Janssens janssens-ge...@telenet.be
 
 This is also where I stranded so far on Fedora 16, with test packages
 for
 Guile 2.0 installed.
 
 My guile knowledge is too limited to understand this well. The gnucash
 code
 has a definition for the hash-table procedure. But this should only be
 triggered for guile 1.8 and older.
 
 Guile 2.0 has its own definition of hash-table. Perhaps these
 definitions are
 not compatible ? I mean, the gnucash guile code was written for guile
 1.6 and
 1.8. So perhaps GnuCash interprets hash-table differently in terms of
 1.8
 while the 2.0 definition may be slightly different ?
 
 From what I could read in the guile 2.0 manual it doesn't seem like
 
 that.
 
 Geert
 
 according to the manual guile provides two types of hashtables one
 abstract type and one vectorlike type. May be that mixing both types
 was allowed in guile 1.8 but not longer in 2.0
 
 In file html-style-info.scm a vector type table was created. The lines
 for the abstract type are outcommented. May be that the hanging
 hash-fold should be replaced by a construction similare to kvt-fold.???
 
 Rudolf
 
 
 In the file html-document.scm line 292 I have replaced hash-fold with
 kvt-fold so that this line reads now:
  (if attr (kvt-fold add-attribute  #f attr))
 The reports are working now!!
 Obviously guile-2 has different sorts of hashtables.
 
 Starting gnucash within the console will result in a new compile process
 for the guile files. Besides masses of warnings there are some errors
 relating missing sw_*** files The lines (load-extension ..) in
 file core-utils.scm, gnc-module.scm and qif-import.scm should be
 replaced with (eval-when (compile load eval) (load-extension...)). In
 file app-utils.scm it should read (eval-whwn (compile load eval)
 (gnc:module-load gnucash/engine 0)).
 One error in business-reports.scm remains : unbound variable:
 gnc:menuname-business-reports which I do not understand??? But as long
 gnucash does not use these compiled files it is not very relevant.
 
 RBB
 

Rudolf,

Thanks for figuring this out. I'll play with it one of the next days to see if 
I can come up with a guile 2.0 fix based on your findings.  One thing to keep 
in mind is that guile 1.8 should still be supported as well, so perhaps the 
eval-when (compile ...) constructs may have to be wrapped once again in guile2 
a guile2 only selector.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: guile-2.0

2012-02-03 Thread Geert Janssens
Op vrijdag 3 februari 2012 13:15:32 schreef rbibr...@t-online.de:
 Hello,
 as reported in one of my earlier mails I have build a working gnucash
 (opensuse 12.1, guile 2). but starting a report  is still impossible.
 Today I tried it again in the console and got this message:
 
 ERROR: In procedure hash-fold: Wrong type argument in position 3
 (expecting hash-table): #(((bgcolor . #f6ffdb)))
 
 this seemed to be in file html-document.scm line 292
 
 actually I do not now if this is indeed an error in this file or one of
 the new guile-2 things. ???
 
This is also where I stranded so far on Fedora 16, with test packages for 
Guile 2.0 installed.

My guile knowledge is too limited to understand this well. The gnucash code 
has a definition for the hash-table procedure. But this should only be 
triggered for guile 1.8 and older.

Guile 2.0 has its own definition of hash-table. Perhaps these definitions are 
not compatible ? I mean, the gnucash guile code was written for guile 1.6 and 
1.8. So perhaps GnuCash interprets hash-table differently in terms of 1.8 
while the 2.0 definition may be slightly different ?

From what I could read in the guile 2.0 manual it doesn't seem like that.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: guile-2.0

2012-02-03 Thread rbibr...@t-online.de

-Original Message-
Date: Fri, 03 Feb 2012 13:36:58 +0100
Subject: Re: guile-2.0
From: Geert Janssens janssens-ge...@telenet.be

This is also where I stranded so far on Fedora 16, with test packages
for 
Guile 2.0 installed.

My guile knowledge is too limited to understand this well. The gnucash
code 
has a definition for the hash-table procedure. But this should only be 
triggered for guile 1.8 and older.

Guile 2.0 has its own definition of hash-table. Perhaps these
definitions are 
not compatible ? I mean, the gnucash guile code was written for guile
1.6 and 
1.8. So perhaps GnuCash interprets hash-table differently in terms of
1.8 
while the 2.0 definition may be slightly different ?

From what I could read in the guile 2.0 manual it doesn't seem like
that.

Geert

according to the manual guile provides two types of hashtables one
abstract type and one vectorlike type. May be that mixing both types
was allowed in guile 1.8 but not longer in 2.0

In file html-style-info.scm a vector type table was created. The lines
for the abstract type are outcommented. May be that the hanging
hash-fold should be replaced by a construction similare to kvt-fold.???

Rudolf



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel