all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tree doesn't get called
@ 2017-05-05 15:50 Catonano
  2017-05-05 22:24 ` Eric Bavier
  2017-05-08  7:34 ` Mark H Weaver
  0 siblings, 2 replies; 16+ messages in thread
From: Catonano @ 2017-05-05 15:50 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

stranded as usual.

So here's the package
http://paste.lisp.org/display/345871

What is wrong with it ?

The build fails, the build folder (kept in /tmp) is empty

Further, when I attempt to call tree, tree doesn't get called

Thanks in advance

[-- Attachment #2: Type: text/html, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-05 15:50 tree doesn't get called Catonano
@ 2017-05-05 22:24 ` Eric Bavier
  2017-05-08  5:02   ` Catonano
  2017-05-08  7:34 ` Mark H Weaver
  1 sibling, 1 reply; 16+ messages in thread
From: Eric Bavier @ 2017-05-05 22:24 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix

On Fri, 5 May 2017 17:50:53 +0200
Catonano <catonano@gmail.com> wrote:

> stranded as usual.
> 
> So here's the package
> http://paste.lisp.org/display/345871
> 
> What is wrong with it ?
> 
> The build fails, the build folder (kept in /tmp) is empty
> 
> Further, when I attempt to call tree, tree doesn't get called

trivial-build-system requires you to do a lot manually.  In this case
'(zero? (system* "tree"))' fails because it's not found in $PATH.  

And the build folder is empty because the builder doesn't put anything
there! :)  Since you're working from a git checkout here, you could
probably copy/compile things directly from the source checkout to 'out'.

Hope that helps,
`~Eric

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-05 22:24 ` Eric Bavier
@ 2017-05-08  5:02   ` Catonano
  2017-05-08  6:08     ` Ricardo Wurmus
  0 siblings, 1 reply; 16+ messages in thread
From: Catonano @ 2017-05-08  5:02 UTC (permalink / raw)
  To: Eric Bavier; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]

Eric,

2017-05-06 0:24 GMT+02:00 Eric Bavier <ericbavier@openmailbox.org>:

> On Fri, 5 May 2017 17:50:53 +0200
> Catonano <catonano@gmail.com> wrote:
>
> > stranded as usual.
> >
> > So here's the package
> > http://paste.lisp.org/display/345871
> >
> > What is wrong with it ?
> >
> > The build fails, the build folder (kept in /tmp) is empty
> >
> > Further, when I attempt to call tree, tree doesn't get called
>
> trivial-build-system requires you to do a lot manually.  In this case
> '(zero? (system* "tree"))' fails because it's not found in $PATH.
>
> And the build folder is empty because the builder doesn't put anything
> there! :)  Since you're working from a git checkout here, you could
> probably copy/compile things directly from the source checkout to 'out'.
>
> Hope that helps,
> `~Eric
>
>

Thank you so much or your help

Would you mind to take a look at this new version ?

http://paste.lisp.org/display/346142

The

(copy-file file
           dest-file)

piece fails with

...
In unknown file:
   ?: 0 [copy-file "include.scm" ...]

ERROR: In procedure copy-file:
ERROR: In procedure copy-file: No such file or directory

But as you can see on te "tree" output, include.scm is there indeed

Thanks in advance

[-- Attachment #2: Type: text/html, Size: 4877 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-08  5:02   ` Catonano
@ 2017-05-08  6:08     ` Ricardo Wurmus
  2017-05-08 17:14       ` Catonano
  0 siblings, 1 reply; 16+ messages in thread
From: Ricardo Wurmus @ 2017-05-08  6:08 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix


Catonano <catonano@gmail.com> writes:

> Would you mind to take a look at this new version ?
>
> http://paste.lisp.org/display/346142
>
> The
>
> (copy-file file
>            dest-file)
>
> piece fails with
>
> ...
> In unknown file:
>    ?: 0 [copy-file "include.scm" ...]
>
> ERROR: In procedure copy-file:
> ERROR: In procedure copy-file: No such file or directory
>
> But as you can see on te "tree" output, include.scm is there indeed

It looks like you first need to create the target directory (with
“mkdir-p”).

BTW: instead of an explicit list for scm-files you could use this:

    (find-files "." "\\.scm$")

--
Ricardo

  GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
  https://elephly.net

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-05 15:50 tree doesn't get called Catonano
  2017-05-05 22:24 ` Eric Bavier
@ 2017-05-08  7:34 ` Mark H Weaver
  2017-05-08 17:28   ` Catonano
  1 sibling, 1 reply; 16+ messages in thread
From: Mark H Weaver @ 2017-05-08  7:34 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix

Catonano <catonano@gmail.com> writes:
> So here's the package
> http://paste.lisp.org/display/345871
>
> What is wrong with it ?

Please always include the relevant code snippets in the email itself,
rather than using a paste site.  Paste sites are useful for contexts
such as IRC where pasting more than a few lines is inconvenient and
generally frowned upon, and where the discussions are ephemeral.

On the other hand, these email lists are archived and we would like the
archives to be comprehensible to future readers.  That will not be
possible for the emails in this thread after the code under discussion
has been deleted from the paste site, or the paste site goes offline.

There are also privacy implications to forcing the readers of your email
to click on a link, thus creating network traffic and a log on someone's
server, in order to see the core content of your message.

What do you think?

    Regards,
      Mark

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-08  6:08     ` Ricardo Wurmus
@ 2017-05-08 17:14       ` Catonano
  2017-05-08 17:45         ` Catonano
  2017-05-08 20:19         ` Ricardo Wurmus
  0 siblings, 2 replies; 16+ messages in thread
From: Catonano @ 2017-05-08 17:14 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 2743 bytes --]

2017-05-08 8:08 GMT+02:00 Ricardo Wurmus <rekado@elephly.net>:

>
>
> It looks like you first need to create the target directory (with
> “mkdir-p”).
>

wonderful, thanks


>
> BTW: instead of an explicit list for scm-files you could use this:
>
>     (find-files "." "\\.scm$")
>

Thanks, Ricardo.

This is the new error

ice-9/eval.scm:386:9: In procedure eval:
ice-9/eval.scm:386:9: Throw to key `match-error' with args `("match" "no
matching pattern" ("" "/include" "scm"))'.


I guess the culprit is this


(for-each (lambda (file)
        (let* ((dest-file ...)
           (go-file (match (string-split file #\.)
                   ((base _)
                    (string-append module-dir "/" base ".go")))))...)))

The first file processed is "include.scm"

I'm not sure what "no matching pattern" means
The spliitting in "include" and "scm" seems corretc (where does that slash
come from ?)

And i I switch back to the explicit list of files, I get:

wrote
`/gnu/store/mdirmfqcs2cadk8ram89j7i0z9zlrqvb-guile-miniadapton-master/share/guile/site/2.2/include.go'

So the first file ("include.scm") gets correctly written

But then:

Backtrace:
In ice-9/boot-9.scm:
 160: 16 [catch #t #<catch-closure 8c5dc0> ...]
In unknown file:
   ?: 15 [apply-smob/1 #<catch-closure 8c5dc0>]
In ice-9/boot-9.scm:
  66: 14 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 13 [eval # #]
In ice-9/boot-9.scm:
2412: 12 [save-module-excursion #<procedure 8e6840 at
ice-9/boot-9.scm:4084:3 ()>]
4089: 11 [#<procedure 8e6840 at ice-9/boot-9.scm:4084:3 ()>]
1734: 10 [%start-stack load-stack #<procedure 8f6e20 at
ice-9/boot-9.scm:4080:10 ()>]
1739: 9 [#<procedure 8f8960 ()>]
In unknown file:
   ?: 8 [primitive-load
"/gnu/store/a0z8jd9sxxi6gnip6sfhrm3i06s6c9vv-guile-miniadapton-master-guile-builder"]
In ice-9/eval.scm:
 387: 7 [eval # ()]
In srfi/srfi-1.scm:
 827: 6 [every1 #<procedure c7d2e0 at
/gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:649:9
(expr)> ...]
In
/gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:
 653: 5 [#<procedure c7d2e0 at
/gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:649:9
(expr)> #]
In ice-9/eval.scm:
 432: 4 [eval # #]
In ice-9/boot-9.scm:
 778: 3 [for-each #<procedure ecda50 at ice-9/eval.scm:416:20 (a)> #]
In ice-9/eval.scm:
 399: 2 [eval # #]
 387: 1 [eval # #]
In unknown file:
   ?: 0 [0 0]

ERROR: In procedure 0:
ERROR: Wrong type to apply: 0


what does this error message mean ?

Why the second file causes an error ?

Maybe I'm being petty, I'm sorry

I'm just a bit confused

[-- Attachment #2: Type: text/html, Size: 4028 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-08  7:34 ` Mark H Weaver
@ 2017-05-08 17:28   ` Catonano
  2017-05-08 17:58     ` Ricardo Wurmus
  0 siblings, 1 reply; 16+ messages in thread
From: Catonano @ 2017-05-08 17:28 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]

Mark,

2017-05-08 9:34 GMT+02:00 Mark H Weaver <mhw@netris.org>:

> Catonano <catonano@gmail.com> writes:
> > So here's the package
> > http://paste.lisp.org/display/345871
> >
> > What is wrong with it ?
>
> Please always include the relevant code snippets in the email itself,
> rather than using a paste site.  Paste sites are useful for contexts
> such as IRC where pasting more than a few lines is inconvenient and
> generally frowned upon, and where the discussions are ephemeral.
>
> On the other hand, these email lists are archived and we would like the
> archives to be comprehensible to future readers.  That will not be
> possible for the emails in this thread after the code under discussion
> has been deleted from the paste site, or the paste site goes offline.
>
> There are also privacy implications to forcing the readers of your email
> to click on a link, thus creating network traffic and a log on someone's
> server, in order to see the core content of your message.
>
> What do you think?
>

I'm ready to adhere to any guidelines set set by the community

I have no problem in pasting pieces of code directly in the emails body

I just hadn't considered the concerns you are raising

In fact, I'd paste code even on IRC channels, I don't do so because I have
been requested to abstain from pasting code in chat channels in the past

But I don't understand the reason why that is not desirable, inconvenient
and frown upon.

I just adhere to a costme that seems to be common and widely accepted, or
even assumed.

I can do te same for mailing lists of course. I just thought the set of
assumptions was the same

So I will follow your lead in the future, I have begun already !

In this same thread I reported errors and pieces of code pasting the wole
thing in the email body

It's even more practical, like this !

[-- Attachment #2: Type: text/html, Size: 2684 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-08 17:14       ` Catonano
@ 2017-05-08 17:45         ` Catonano
  2017-05-08 20:19         ` Ricardo Wurmus
  1 sibling, 0 replies; 16+ messages in thread
From: Catonano @ 2017-05-08 17:45 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 4508 bytes --]

just for reference, this is the whole text

(define-public guile-miniadapton
  (package
    (name "guile-miniadapton")
    (version "master")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/fisherdj/miniAdapton")
                    (commit "1b5749422304567c96ac5367f2221dda9eff5880")))
            (file-name (string-append name "-" version "-checkout"))
            (sha256
             (base32
              "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
  (build-system gnu-build-system)
  (arguments
   `(#:modules
     ((guix build utils)
      (ice-9 match)
      (ice-9 popen)
      (ice-9 rdelim)
      (guix build gnu-build-system))
     #:phases
     (modify-phases %standard-phases
       (delete 'configure)
       (delete 'build)
       (delete 'check)
       (replace 'install
                (lambda* (#:key inputs outputs #:allow-other-keys)
                  (let* ((out (assoc-ref outputs "out"))
                         (effective (read-line
                                     (open-pipe* OPEN_READ
                                                 "guile" "-c"
                                                 "(display
(effective-version))")))
                         (zero? (system* "tree"))
                         (module-dir (string-append out "/share/guile/site/"
                                                    effective))
                         (source (assoc-ref inputs "source"))
                         ;;(scm-files (find-files "." "\\.scm$"))
                         (scm-files '("include.scm"
                                      "microadapton.scm"
                                      "microadapton-impl.scm"
                                      "microadapton-types.scm"
                                      "memoization.scm"
                                      "memoization-impl.scm"
                                      "miniadapton.scm"
                                      "miniadapton-impl.scm"
                                      "set.scm"
                                      "set-impl.scm"))
                         (guild (string-append (assoc-ref %build-inputs
"guile")
                                               "/bin/guild")))
                    ;; Make installation directories.
                    ;;(mkdir-p (string-append module-dir "source"))
                    (mkdir-p module-dir)
                    ;; Compile .scm files and install.
                    (setenv "GUILE_AUTO_COMPILE" "0")
                    (for-each (lambda (file)
                                (let* ((dest-file (string-append
                                                 module-dir "/"
                                                 file))
                                       (go-file (match (string-split file
#\.)
                                                  ((base _)
                                                   (string-append
module-dir "/" base ".go")))))

                                  ;; Install source module.
                                  (copy-file file
                                             dest-file)
                                  ;; Install compiled module.
                                  (unless (zero? (system* guild "compile"
                                                          "-L" (getcwd)
                                                          "-o" go-file
                                                          file))
                                    (error (format #f "Failed to compile ~s
to ~s!"
                                                   file dest-file)))))
                              scm-files)
                    #t))))))
  (inputs
   `(("guile" ,guile-2.2)))
  (native-inputs
   `(("tree" ,tree)))
  (home-page "https://github.com/fisherdj/miniAdapton")
  (synopsis "a minimal implementation of incremental computation
in (Guile) Scheme")
  (description
   "a complete Scheme implementation of
miniAdapton, which implements the core functionality of the
Adapton system for incremental computation (also  known
as self-adjusting computation).
Like Adapton, miniAdapton allows programmers to safely combine
mutation and memoization.
miniAdapton is built on top of an even simpler system,
microAdapton.
Both miniAdapton and microAdapton
are designed to be easy to understand, extend, and port to
host languages other than Scheme.")
  (license license:expat)))

[-- Attachment #2: Type: text/html, Size: 7313 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-08 17:28   ` Catonano
@ 2017-05-08 17:58     ` Ricardo Wurmus
  0 siblings, 0 replies; 16+ messages in thread
From: Ricardo Wurmus @ 2017-05-08 17:58 UTC (permalink / raw)
  To: Catonano; +Cc: Mark H Weaver, help-guix


Catonano <catonano@gmail.com> writes:

> In fact, I'd paste code even on IRC channels, I don't do so because I have
> been requested to abstain from pasting code in chat channels in the past
>
> But I don't understand the reason why that is not desirable, inconvenient
> and frown upon.

IRC is for real-time conversations, and pasting many lines of code there
makes it hard to converse.  A channel can be very crowded even without
pasting code snippets, so it’s best to keep excess text to a minimum.  I
guess that’s why it’s customary on IRC to paste code elsewhere and just
link to it.

For mails it’s fine (and desirable) to include code snippets inline or
as attachments.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-08 17:14       ` Catonano
  2017-05-08 17:45         ` Catonano
@ 2017-05-08 20:19         ` Ricardo Wurmus
  2017-05-09 15:41           ` Catonano
  1 sibling, 1 reply; 16+ messages in thread
From: Ricardo Wurmus @ 2017-05-08 20:19 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix


Here’s a version that works for me:

--8<---------------cut here---------------start------------->8---
(define-public guile-miniadapton
  (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
        (revision "1"))
    (package
      (name "guile-miniadapton")
      (version (string-append "0-" revision "." (string-take commit 9)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/fisherdj/miniAdapton.git")
                      (commit commit)))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
                  "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
      (build-system gnu-build-system)
      (arguments
       `(#:modules ((guix build utils)
                    (ice-9 popen)
                    (ice-9 rdelim)
                    (srfi srfi-1)
                    (guix build gnu-build-system))
         #:tests? #f                    ; there is no test target
         #:phases
         (modify-phases %standard-phases
           (delete 'configure)
           (delete 'build)
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((cwd        (getcwd))
                      (scm-files  (find-files "." "\\.scm$"))
                      (effective  (read-line
                                   (open-pipe* OPEN_READ
                                               "guile" "-c"
                                               "(display (effective-version))")))
                      (module-dir (string-append (assoc-ref outputs "out")
                                                 "/share/guile/site/"
                                                 effective)))

                 ;; Make installation directories.
                 (mkdir-p module-dir)

                 (setenv "GUILE_AUTO_COMPILE" "0")

                 ;; Compile .scm files and install.
                 (every (lambda (file)
                          (let ((go-file (string-append module-dir "/"
                                                        (basename file ".scm") ".go")))
                            ;; Install source module.
                            (install-file file module-dir)
                            ;; Compile and install module.
                            (zero? (system* "guild" "compile" "-L" cwd
                                            "-o" go-file file))))
                        scm-files)))))))
      (inputs
       `(("guile" ,guile-2.2)))
      (home-page "https://github.com/fisherdj/miniAdapton")
      (synopsis "Minimal implementation of incremental computation in Guile
Scheme")
      (description "This package provides a complete Scheme implementation of
miniAdapton, which implements the core functionality of the Adapton system for
incremental computation (also known as self-adjusting computation).  Like
Adapton, miniAdapton allows programmers to safely combine mutation and
memoization.  miniAdapton is built on top of an even simpler system,
microAdapton.  Both miniAdapton and microAdapton are designed to be easy to
understand, extend, and port to host languages other than Scheme.")
      (license license:expat))))
--8<---------------cut here---------------end--------------->8---

If you have any questions about this just ask!

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-08 20:19         ` Ricardo Wurmus
@ 2017-05-09 15:41           ` Catonano
  2017-05-09 15:43             ` Catonano
  2017-05-09 17:20             ` Ricardo Wurmus
  0 siblings, 2 replies; 16+ messages in thread
From: Catonano @ 2017-05-09 15:41 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

Ricardo,

2017-05-08 22:19 GMT+02:00 Ricardo Wurmus <rekado@elephly.net>:

>
> Here’s a version that works for me:
>
>
>                  ;; Compile .scm files and install.
>                  (every (lambda (file)
>                           (let ((go-file (string-append module-dir "/"
>                                                         (basename file
> ".scm") ".go")))
>                             ;; Install source module.
>                             (install-file file module-dir)
>                             ;; Compile and install module.
>                             (zero? (system* "guild" "compile" "-L" cwd
>                                             "-o" go-file file))))
>

The differences with my version is that you use install-file insted of
copy-file  and you pass the -L (cwd) switch to guild

I wonder what was causing my issue ?


> If you have any questions about this just ask!
>
>
Thank you so much or your help

I appreciate it

[-- Attachment #2: Type: text/html, Size: 1819 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-09 15:41           ` Catonano
@ 2017-05-09 15:43             ` Catonano
  2017-05-10 19:51               ` Ricardo Wurmus
  2017-05-09 17:20             ` Ricardo Wurmus
  1 sibling, 1 reply; 16+ messages in thread
From: Catonano @ 2017-05-09 15:43 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

I forgot: the linter crashes, but not only on guile-miniadapton. Also on
guile-irregex that was already there

It might be something in the maser branch or something in my setup. I
updated my system recently and I still don't know what is going on.

Well, I know what is going on less than usual ;-)

Thanks again !

Backtrace:uile-irregex@0.9.6 [cve]...
           9 (primitive-load "/home/catonano/projects/readxl/scripts…")
In guix/ui.scm:
   1255:8  8 (run-guix-command _ . _)
In srfi/srfi-1.scm:
    640:9  7 (for-each #<procedure 2082120 at guix/scripts/lint.scm…> …)
In guix/scripts/lint.scm:
    982:4  6 (run-checkers _ _)
In srfi/srfi-1.scm:
    640:9  5 (for-each #<procedure 33626c0 at guix/scripts/lint.scm…> …)
In guix/scripts/lint.scm:
    805:4  4 (check-vulnerabilities _)
    800:9  3 (_ _)
In unknown file:
           2 (force #<promise #<procedure 7fd838ecbf88 at guix/scrip…>)
In guix/scripts/lint.scm:
   789:24  1 (_)
In ice-9/boot-9.scm:
    837:9  0 (catch srfi-34 #<procedure 7fd838ed73a8 at guix/script…> …)

ice-9/boot-9.scm:837:9: In procedure catch:
ice-9/boot-9.scm:837:9: Wrong type to apply: #<unknown-type (0x24f .
0x7fd83aa8ae08) @ 0x7fd83b040318>

[-- Attachment #2: Type: text/html, Size: 1525 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-09 15:41           ` Catonano
  2017-05-09 15:43             ` Catonano
@ 2017-05-09 17:20             ` Ricardo Wurmus
  2017-05-09 18:12               ` Catonano
  1 sibling, 1 reply; 16+ messages in thread
From: Ricardo Wurmus @ 2017-05-09 17:20 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix


Catonano <catonano@gmail.com> writes:

>> Here’s a version that works for me:
>>
>>
>>                  ;; Compile .scm files and install.
>>                  (every (lambda (file)
>>                           (let ((go-file (string-append module-dir "/"
>>                                                         (basename file
>> ".scm") ".go")))
>>                             ;; Install source module.
>>                             (install-file file module-dir)
>>                             ;; Compile and install module.
>>                             (zero? (system* "guild" "compile" "-L" cwd
>>                                             "-o" go-file file))))
>>
>
> The differences with my version is that you use install-file insted of
> copy-file  and you pass the -L (cwd) switch to guild

These were mostly cosmetic changes.  I evaluate “(getcwd)” once and bind
it to “cwd” instead of evaluating it again and again for each file.
This is not what fixed the crash.

“install-file” only takes a file and a directory, unlike “copy-file”
which takes a source file name and a target file name.  I did this just
to simplify the code.

> I wonder what was causing my issue ?

Another difference is that I’m using “basename”.  Your use of “match”
didn’t work, because the match pattern wasn’t correct for the
“find-files” case.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-09 17:20             ` Ricardo Wurmus
@ 2017-05-09 18:12               ` Catonano
  0 siblings, 0 replies; 16+ messages in thread
From: Catonano @ 2017-05-09 18:12 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1791 bytes --]

2017-05-09 19:20 GMT+02:00 Ricardo Wurmus <rekado@elephly.net>:

>
> Catonano <catonano@gmail.com> writes:
>
> >> Here’s a version that works for me:
> >>
> >>
> >>                  ;; Compile .scm files and install.
> >>                  (every (lambda (file)
> >>                           (let ((go-file (string-append module-dir "/"
> >>                                                         (basename file
> >> ".scm") ".go")))
> >>                             ;; Install source module.
> >>                             (install-file file module-dir)
> >>                             ;; Compile and install module.
> >>                             (zero? (system* "guild" "compile" "-L" cwd
> >>                                             "-o" go-file file))))
> >>
> >
> > The differences with my version is that you use install-file insted of
> > copy-file  and you pass the -L (cwd) switch to guild
>
> These were mostly cosmetic changes.  I evaluate “(getcwd)” once and bind
> it to “cwd” instead of evaluating it again and again for each file.
>

Yes I get that, I wrote "-L (cwd)" ust for brevity ;-)


> This is not what fixed the crash.
>

mmm ok


>
> “install-file” only takes a file and a directory, unlike “copy-file”
> which takes a source file name and a target file name.  I did this just
> to simplify the code.
>
> > I wonder what was causing my issue ?
>
> Another difference is that I’m using “basename”.  Your use of “match”
> didn’t work, because the match pattern wasn’t correct for the
> “find-files” case.
>

My use of match didn't work, but it hanged also when I used an explicit list

Admittedly I had probably messed up the call to basename

Oh well

Thanks anyway

[-- Attachment #2: Type: text/html, Size: 3007 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-09 15:43             ` Catonano
@ 2017-05-10 19:51               ` Ricardo Wurmus
  2017-05-11  4:20                 ` Catonano
  0 siblings, 1 reply; 16+ messages in thread
From: Ricardo Wurmus @ 2017-05-10 19:51 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix


Catonano <catonano@gmail.com> writes:

> I forgot: the linter crashes, but not only on guile-miniadapton. Also on
> guile-irregex that was already there

[…]

> Backtrace:uile-irregex@0.9.6 [cve]...
>            9 (primitive-load
>            "/home/catonano/projects/readxl/scripts…")

That’s suspicous…

> In guix/ui.scm:
>    1255:8  8 (run-guix-command _ . _)
> In srfi/srfi-1.scm:
>     640:9  7 (for-each #<procedure 2082120 at guix/scripts/lint.scm…> …)
> In guix/scripts/lint.scm:
>     982:4  6 (run-checkers _ _)
> In srfi/srfi-1.scm:
>     640:9  5 (for-each #<procedure 33626c0 at guix/scripts/lint.scm…> …)
> In guix/scripts/lint.scm:
>     805:4  4 (check-vulnerabilities _)
>     800:9  3 (_ _)
> In unknown file:
>            2 (force #<promise #<procedure 7fd838ecbf88 at guix/scrip…>)
> In guix/scripts/lint.scm:
>    789:24  1 (_)
> In ice-9/boot-9.scm:
>     837:9  0 (catch srfi-34 #<procedure 7fd838ed73a8 at guix/script…> …)
>
> ice-9/boot-9.scm:837:9: In procedure catch:
> ice-9/boot-9.scm:837:9: Wrong type to apply: #<unknown-type (0x24f .
> 0x7fd83aa8ae08) @ 0x7fd83b040318>

I cannot reproduce this running “./pre-inst-env guix lint guile-irregex”
on master.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tree doesn't get called
  2017-05-10 19:51               ` Ricardo Wurmus
@ 2017-05-11  4:20                 ` Catonano
  0 siblings, 0 replies; 16+ messages in thread
From: Catonano @ 2017-05-11  4:20 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

2017-05-10 21:51 GMT+02:00 Ricardo Wurmus <rekado@elephly.net>:

>
> I cannot reproduce this running “./pre-inst-env guix lint guile-irregex”
> on master.
>

So it must be my setup.

Interestingly, this happens also in the other master folder that I keep

We'll see

Thanks or checking !

[-- Attachment #2: Type: text/html, Size: 695 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-05-11  4:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-05 15:50 tree doesn't get called Catonano
2017-05-05 22:24 ` Eric Bavier
2017-05-08  5:02   ` Catonano
2017-05-08  6:08     ` Ricardo Wurmus
2017-05-08 17:14       ` Catonano
2017-05-08 17:45         ` Catonano
2017-05-08 20:19         ` Ricardo Wurmus
2017-05-09 15:41           ` Catonano
2017-05-09 15:43             ` Catonano
2017-05-10 19:51               ` Ricardo Wurmus
2017-05-11  4:20                 ` Catonano
2017-05-09 17:20             ` Ricardo Wurmus
2017-05-09 18:12               ` Catonano
2017-05-08  7:34 ` Mark H Weaver
2017-05-08 17:28   ` Catonano
2017-05-08 17:58     ` Ricardo Wurmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.