Fix several dependency issues in scheme code

* Ensure all the files included in report.scm are built before
  any module calls '(use-modules (gnucash report))'
* Break circular dependency between report.scm and the files it loads via
  '(load-from-path ...)'
  For example file 'gnucash/report/html-linechart' is loaded via
  '(load-from-path ...)' in 'reports.scm' it shouldn't call
  '(use-modules (gnucash report))'. That would  make it indirectly
  depend on its own.
* In the same way 'engine-utilities.scm' was in a circular dependency loop
  with 'engine.scm' though even more indirectly via (gnc-module-load ...)'.
  The initialization code of libgncmod-engine calls
  '(use-modules (gnucash engine))' which in turn tries to load-from-path
  'engine-utilities.scm', completing the loop.
This commit is contained in:
Geert Janssens 2019-09-12 10:10:58 +02:00
parent 0b3752d9cb
commit 617c4c4ade
6 changed files with 5 additions and 10 deletions

View File

@ -132,7 +132,7 @@ gnc_add_scheme_deprecated_module ("gnucash report report-system report-collector
gnc_add_scheme_deprecated_module ("gnucash report stylesheets" "" "" "") gnc_add_scheme_deprecated_module ("gnucash report stylesheets" "" "" "")
gnc_add_scheme_deprecated_module ("gnucash report utility-reports" "" "" "") gnc_add_scheme_deprecated_module ("gnucash report utility-reports" "" "" "")
add_custom_target(scm-report ALL DEPENDS scm-report-eguile) add_custom_target(scm-report ALL DEPENDS scm-report-2 scm-report-eguile)
set_local_dist(report_DIST_local CMakeLists.txt set_local_dist(report_DIST_local CMakeLists.txt
report.i report.i

View File

@ -21,8 +21,6 @@
;; Boston, MA 02110-1301, USA gnu@gnu.org ;; Boston, MA 02110-1301, USA gnu@gnu.org
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (gnucash report))
(define <html-barchart> (define <html-barchart>
(make-record-type "<html-barchart>" (make-record-type "<html-barchart>"
'(width '(width

View File

@ -24,8 +24,6 @@
;; Boston, MA 02110-1301, USA gnu@gnu.org ;; Boston, MA 02110-1301, USA gnu@gnu.org
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (gnucash report))
(define <html-linechart> (define <html-linechart>
(make-record-type "<html-linechart>" (make-record-type "<html-linechart>"
'(width '(width

View File

@ -21,8 +21,6 @@
;; Boston, MA 02110-1301, USA gnu@gnu.org ;; Boston, MA 02110-1301, USA gnu@gnu.org
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (gnucash report))
(define <html-piechart> (define <html-piechart>
(make-record-type "<html-piechart>" (make-record-type "<html-piechart>"
'(width '(width

View File

@ -24,8 +24,6 @@
;; Boston, MA 02110-1301, USA gnu@gnu.org ;; Boston, MA 02110-1301, USA gnu@gnu.org
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (gnucash report))
(define <html-scatter> (define <html-scatter>
(make-record-type "<html-scatter>" (make-record-type "<html-scatter>"
'(width '(width

View File

@ -22,7 +22,10 @@
;; Copyright 2000 Rob Browning <rlb@cs.utexas.edu> ;; Copyright 2000 Rob Browning <rlb@cs.utexas.edu>
(use-modules (gnucash gnc-module)) (use-modules (gnucash gnc-module))
(gnc:module-begin-syntax (gnc:module-load "gnucash/engine" 0)) (eval-when
(compile load eval expand)
(load-extension "libgncmod-engine" "scm_init_sw_engine_module"))
(use-modules (sw_engine))
(use-modules (srfi srfi-1) (use-modules (srfi srfi-1)
(srfi srfi-13)) (srfi srfi-13))