~abcdw/rde-discuss

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 2

Error while reconfigure: No code for module

Details
Message ID
<875ymay7uz.fsf@minikn.xyz>
DKIM signature
pass
Download raw message
Hello,

I've recently rewritten my config in an attempt to simpliy it,
unfortunately, I'm currently unable to reconfigure my system. You can
find the code here:
https://github.com/minikN/guix/tree/baeda17afc78be0a24bf769ed95e6c641df2d5fd

Normally, I should be able to run `make hr` in the root of the repo. It
errors out with `no code for module (config geekcave)`. So I run this
command to find the error in geekcave.scm:

--8<---------------cut here---------------start------------->8---
GUILE_LOAD_PATH=./:../rde guix build -f geekcave.scm
--8<---------------cut here---------------end--------------->8---

It returns: `no code for module (config base)`, so I run the same
command with base-features.scm. It returns `no code for module (config
features emacs-xyz)`.

Again, I run the same command with `features/emacs-xyz.scm`. I get
`no code for module (config packages)`. Then finally, when I run the
command with `packages.scm` I get this:

--8<---------------cut here---------------start------------->8---
guix build: error: #<unspecified>: not something we can build

hint: If you build from a file, make sure the last Scheme expression returns a package value.  `define-public' defines a variable, but
returns `#<unspecified>'.  To fix this, add a Scheme expression at the end of the file that consists only of the package's
variable name you defined, as in this example:

     (define-public my-package
       (package
         ...))
     
     my-package
--8<---------------cut here---------------end--------------->8---

Indicating to that there is nothing wrong with the fil. If I add
`emacs-corfu-doc` at the end of it, it successfully returns the store
path if I build it again. So I don't really know where the error is
here.

I've looked at it for hours now and am out of ideas. I'd appreciate any
help and also some tips on how to approach problems like this better in
terms of debugging.

-- 
Best regards / Mit freundlichen Grüßen,
Demis Balbach

[PATCH] Change modules placement, migrate to new elisp service.

Details
Message ID
<875ym9kjpk.fsf@trop.in>
In-Reply-To
<875ymay7uz.fsf@minikn.xyz> (view parent)
DKIM signature
pass
Download raw message
Patch: +18 -11
---
IIRC in scheme, file path should follow the module name.  The errors are
cryptic indeed and IDK a good solution to it yet.  Also, I'm not aware
of a good debug techniques for such cases.  The patch below allows to
build your home environment, at least the build starts without errors, I
didn't wait until the end of it.

 config.scm                                  |  1 +
 base-features.scm => config/base.scm        | 10 ++++++----
 {features => config/features}/emacs-xyz.scm | 12 ++++++++----
 {features => config/features}/games.scm     |  0
 {features => config/features}/linux.scm     |  0
 {features => config/features}/wm.scm        |  0
 geekcave.scm => config/geekcave.scm         |  4 ++--
 packages.scm => config/packages.scm         |  0
 workhorse.scm => config/workhorse.scm       |  2 +-
 9 files changed, 18 insertions(+), 11 deletions(-)
 rename base-features.scm => config/base.scm (97%)
 rename {features => config/features}/emacs-xyz.scm (98%)
 rename {features => config/features}/games.scm (100%)
 rename {features => config/features}/linux.scm (100%)
 rename {features => config/features}/wm.scm (100%)
 rename geekcave.scm => config/geekcave.scm (97%)
 rename packages.scm => config/packages.scm (100%)
 rename workhorse.scm => config/workhorse.scm (97%)

diff --git a/config.scm b/config.scm
index 26e9e29..c785f0f 100644
--- a/config.scm
+++ b/config.scm
@@ -1,5 +1,6 @@
(define-module (config)
  #:use-module (config geekcave)
  #:use-module (ice-9 match)
  #:use-module (rde features))

(define geekcave-os
diff --git a/base-features.scm b/config/base.scm
similarity index 97%
rename from base-features.scm
rename to config/base.scm
index d27bdaa..ff79c69 100644
--- a/base-features.scm
+++ b/config/base.scm
@@ -11,8 +11,8 @@
  #:use-module (ice-9 match)
  #:use-module (config features emacs-xyz)
  #:use-module (config features linux)
  #:use-module (config geekcave)
  #:use-module (config workhorse)
  ;; #:use-module (config geekcave)
  ;; #:use-module (config workhorse)
  #:use-module (rde features base)
  #:use-module (rde features emacs)
  #:use-module (rde features fontutils)
@@ -30,7 +30,8 @@
  #:use-module (rde features xdg)
  #:use-module (rde features xdisorg)
  #:use-module (rde features)
  #:export (
  #:export (pkgs

            %base-system-packages
            %base-home-packages

@@ -126,7 +127,7 @@
   ;;; Terminal, shell
   (feature-zsh)
   (feature-vterm)
   (feature-alacritty #:config-file (local-file "./config/alacritty/alacritty.yml")
   (feature-alacritty #:config-file (local-file "./alacritty/alacritty.yml")
                      #:default-terminal? #f)

   ;;; Emacs
@@ -166,6 +167,7 @@
   ;;; Fonts
   (feature-fonts #:font-monospace (font "Iosevka" #:size 15 #:weight 'semi-light))

   (feature-desktop-services)
   (feature-pipewire)
   (feature-rofi)
   (feature-xdg #:xdg-user-directories-configuration
diff --git a/features/emacs-xyz.scm b/config/features/emacs-xyz.scm
similarity index 98%
rename from features/emacs-xyz.scm
rename to config/features/emacs-xyz.scm
index 3e1a1bb..771dcfd 100644
--- a/features/emacs-xyz.scm
+++ b/config/features/emacs-xyz.scm
@@ -91,8 +91,9 @@

  (define (get-home-services config)
    (list
     (elisp-configuration-service
     (rde-elisp-configuration-service
      emacs-f-name
      config
      `((eval-when-compile
         (require 'js)
         (require 'js2-mode)
@@ -214,8 +215,9 @@

  (define (get-home-services config)
    (list
     (elisp-configuration-service
     (rde-elisp-configuration-service
      emacs-f-name
      config
      `((eval-when-compile
         (require 'evil)
         (require 'evil-collection))
@@ -251,8 +253,9 @@ with Emacs as an editor."

  (define (get-home-services config)
    (list
     (elisp-configuration-service
     (rde-elisp-configuration-service
      emacs-f-name
      config
      `((eval-when-compile (require 'smartparens-config))
        (add-hook 'prog-mode-hook 'smartparens-mode)
        (with-eval-after-load
@@ -283,8 +286,9 @@ with Emacs as an editor."

  (define (get-home-services config)
    (list
     (elisp-configuration-service
     (rde-elisp-configuration-service
      emacs-f-name
      config
      `((require 'tramp)
        (defun rde-delete-this-file (&optional path force-p)
          "Delete PATH, kill its buffers and expunge it from vc/magit cache.
diff --git a/features/games.scm b/config/features/games.scm
similarity index 100%
rename from features/games.scm
rename to config/features/games.scm
diff --git a/features/linux.scm b/config/features/linux.scm
similarity index 100%
rename from features/linux.scm
rename to config/features/linux.scm
diff --git a/features/wm.scm b/config/features/wm.scm
similarity index 100%
rename from features/wm.scm
rename to config/features/wm.scm
diff --git a/geekcave.scm b/config/geekcave.scm
similarity index 97%
rename from geekcave.scm
rename to config/geekcave.scm
index 8d1acb5..50d21be 100644
--- a/geekcave.scm
+++ b/config/geekcave.scm
@@ -9,8 +9,8 @@
  #:use-module (rde features system)
  #:use-module (rde features fontutils)
  #:use-module (rde features wm)
  #:use-module (personal features games)
  #:use-module (personal features wm)
  #:use-module (config features games)
  #:use-module (config features wm)
  #:export (geekcave-config))

(define geekcave-sway-config
diff --git a/packages.scm b/config/packages.scm
similarity index 100%
rename from packages.scm
rename to config/packages.scm
diff --git a/workhorse.scm b/config/workhorse.scm
similarity index 97%
rename from workhorse.scm
rename to config/workhorse.scm
index 53e754e..a14afb6 100644
--- a/workhorse.scm
+++ b/config/workhorse.scm
@@ -1,4 +1,4 @@
(define-module (personal workhorse)
(define-module (config workhorse)
  #:use-module (gnu packages)
  #:use-module (gnu system file-systems)
  #:use-module (nongnu packages linux)
-- 
2.36.0

Re: [PATCH] Change modules placement, migrate to new elisp service.

Details
Message ID
<87y1z5bgea.fsf@minikn.xyz>
In-Reply-To
<875ym9kjpk.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
You're a life saver. Thanks so much! I'll try it out now!

-- 
Best regards / Mit freundlichen Grüßen,
Demis Balbach

Re: [PATCH] Change modules placement, migrate to new elisp service.

Details
Message ID
<87pmk4pkuw.fsf@trop.in>
In-Reply-To
<87y1z5bgea.fsf@minikn.xyz> (view parent)
DKIM signature
pass
Download raw message
On 2022-05-13 17:29, Demis Balbach wrote:

> You're a life saver. Thanks so much! I'll try it out now!

You are welcome ;)

-- 
Best regards,
Andrew Tropin
Reply to thread Export thread (mbox)