unofficial mirror of gwl-devel@gnu.org
 help / color / mirror / Atom feed
* Some doc/examples files incompatible with latest update
@ 2019-06-12  4:03 Kyle Meyer
  2019-06-12  9:41 ` Ricardo Wurmus
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2019-06-12  4:03 UTC (permalink / raw)
  To: gwl-devel

Playing around with the latest updates (specifically on commit 08ccba0),
I'm unable to run some of the examples.  For instance, if I try

,----
| doc/examples $ ../../pre-inst-env guix workflow -f --run=simple.scm
| workflow: The "restrictions" field is deprecated.  Use "processes" to specify process dependencies.
| Backtrace:
|           11 (apply-smob/1 #<catch-closure 1c8e900>)
| In ice-9/boot-9.scm:
|     705:2 10 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
| In ice-9/eval.scm:
|     619:8  9 (_ #(#(#<directory (guile-user) 1cbe140>)))
| In guix/ui.scm:
|   1747:12  8 (run-guix-command _ . _)
| In ice-9/eval.scm:
|     619:8  7 (_ #(#(#(#<directory (guix scripts workflow) 209…> …)) …))
|     619:8  6 (_ #(#(#(#<directory (gwl workflows) 21e33c0>) #<…> …) …))
|    626:19  5 (_ #(#(#(#<directory (gwl workflows) 21e33c0>) #<…> …) …))
|    293:34  4 (_ #(#(#(#<directory (gwl workflows) 21e33c0>) #<…> …) …))
|    196:35  3 (_ #(#(#(#<directory (gwl workflows) 21e33c0>) #<…> …) …))
|    293:34  2 (_ #(#(#<directory (gwl workflows) 21e33c0>) #<unspec…>))
| In oop/goops.scm:
|    1492:4  1 (cache-miss #<unspecified>)
| In unknown file:
|            0 (scm-error goops-error #f "No applicable method for ~S…" …)
| 
| ERROR: In procedure scm-error:
| No applicable method for #<<accessor> workflow-processes* (1)> in call
| (workflow-processes* #<unspecified>)
`----

The warning on the first line seems to be spurious---simple.scm doesn't
use "restrictions"---and I'd guess that warning was introduced by
8e76f22 (workflows: Implement <workflow> type with GOOPS).

Anyway the error seems to be related to the expectation that, for
--run=FILE, FILE will evaluate to a workflow.  I must admit I couldn't
glean that from the above error, but I see that d676e60 adjusted some
workflows in this manner.  Doing the same for simple.scm resolves the
above issue, and a similar fix works for simple.scm's wisp counterpart.
Patch below, assuming doing that is the correct fix.

I'm still not able to get extended-example-workflow.scm running despite
d676e60 already adjusting it.  I've debugged it a bit, and there seems
to be a few separate issues, but I didn't get it working and I'm running
out of time at the moment to properly write it up, so I'll leave it be
for now.

-- >8 --
Subject: [PATCH] doc: Update simple examples for d676e60.

* doc/examples/simple-wisp.w:
* doc/examples/simple.scm: Evaluate to a workflow, as expected since
d676e60.
---
 doc/examples/simple-wisp.w | 2 ++
 doc/examples/simple.scm    | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/doc/examples/simple-wisp.w b/doc/examples/simple-wisp.w
index c168881..4ab2495 100644
--- a/doc/examples/simple-wisp.w
+++ b/doc/examples/simple-wisp.w
@@ -26,3 +26,5 @@ workflow: simple-wisp
         eat-veges -> greet
         sleep     -> eat-fruit eat-veges
         bye       -> sleep
+
+. simple-wisp
diff --git a/doc/examples/simple.scm b/doc/examples/simple.scm
index fc1e3b4..e747c81 100644
--- a/doc/examples/simple.scm
+++ b/doc/examples/simple.scm
@@ -37,3 +37,5 @@ (define-public simple
              (eat-veges -> greet)
              (sleep     -> eat-fruit eat-veges)
              (bye       -> sleep))))))
+
+simple
-- 
2.22.0

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

* Re: Some doc/examples files incompatible with latest update
  2019-06-12  4:03 Some doc/examples files incompatible with latest update Kyle Meyer
@ 2019-06-12  9:41 ` Ricardo Wurmus
  2019-06-12 13:37   ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2019-06-12  9:41 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: gwl-devel


Hi Kyle,

> Playing around with the latest updates (specifically on commit 08ccba0),
> I'm unable to run some of the examples.

Sorry for the breakage.  I wasn’t done with implementing proper error
handling and reporting.

> | ERROR: In procedure scm-error:
> | No applicable method for #<<accessor> workflow-processes* (1)> in call
> | (workflow-processes* #<unspecified>)

“load-workflow” now prints an understandable error message when the file
it loads does not evaluate to a workflow.

> The warning on the first line seems to be spurious---simple.scm doesn't
> use "restrictions"---and I'd guess that warning was introduced by
> 8e76f22 (workflows: Implement <workflow> type with GOOPS).

That was indeed a side-effect of initializing the “restrictions” field
to #F.  This is now fixed.

> I'm still not able to get extended-example-workflow.scm running despite
> d676e60 already adjusting it.  I've debugged it a bit, and there seems
> to be a few separate issues, but I didn't get it working and I'm running
> out of time at the moment to properly write it up, so I'll leave it be
> for now.

The problem appeared to be the conflicting import of “zip” from (gnu
packages compression) and (srfi srfi-1), which is loaded by default.
It’s also fixed now.

--
Ricardo

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

* Re: Some doc/examples files incompatible with latest update
  2019-06-12  9:41 ` Ricardo Wurmus
@ 2019-06-12 13:37   ` Kyle Meyer
  2019-06-14 13:52     ` Ricardo Wurmus
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2019-06-12 13:37 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: gwl-devel

Ricardo Wurmus <rekado@elephly.net> writes:

>> | ERROR: In procedure scm-error:
>> | No applicable method for #<<accessor> workflow-processes* (1)> in call
>> | (workflow-processes* #<unspecified>)
>
> “load-workflow” now prints an understandable error message when the file
> it loads does not evaluate to a workflow.

Thanks.

Should simple-wisp.w also be updated to evaluate to a workflow
(something along the lines of the patch I included with my first email)?

,----
| doc/examples $ ../../pre-inst-env guix workflow -f --run=simple-wisp.w
| Compiling simple-wisp.w...OK
| File `simple-wisp.w' does not evaluate to a workflow value.
`----

>> The warning on the first line seems to be spurious---simple.scm doesn't
>> use "restrictions"---and I'd guess that warning was introduced by
>> 8e76f22 (workflows: Implement <workflow> type with GOOPS).
>
> That was indeed a side-effect of initializing the “restrictions” field
> to #F.  This is now fixed.

Great, thanks.

>> I'm still not able to get extended-example-workflow.scm running despite
>> d676e60 already adjusting it.  I've debugged it a bit, and there seems
>> to be a few separate issues, but I didn't get it working and I'm running
>> out of time at the moment to properly write it up, so I'll leave it be
>> for now.
>
> The problem appeared to be the conflicting import of “zip” from (gnu
> packages compression) and (srfi srfi-1), which is loaded by default.
> It’s also fixed now.

Right, that was one thing.  Another thing I hit into is the assumption
that the workflow is executed from a particular location, which is
presumably an interaction between loading extended-example-workflow.scm
and its `(include "example-workflow.scm")'.

I first tried from withing doc/examples/:

,----
| doc/examples $ ../../pre-inst-env guix workflow -f --run=extended-example-workflow.scm
| failed to load 'extended-example-workflow.scm': No such file or directory
|  
|            8 (apply-smob/1 #<catch-closure 1155240>)
| In ice-9/boot-9.scm:
|     705:2  7 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
| In ice-9/eval.scm:
|     619:8  6 (_ #(#(#<directory (guile-user) 11ea140>)))
| In guix/ui.scm:
|   1747:12  5 (run-guix-command _ . _)
| In guix/scripts/workflow.scm:
|    118:17  4 (guix-workflow . _)
| In gwl/utils.scm:
|    103:16  3 (load-workflow "extended-example-workflow.scm")
| In ice-9/boot-9.scm:
|     829:9  2 (catch _ _ #<procedure 7fa7046af488 at gwl/utils.scm:2…> …)
|    2312:4  1 (save-module-excursion _)
| In gwl/utils.scm:
|    281:11  0 (_)
| Error: (system-error open-file ~A: ~S (No such file or directory doc/examples/example-workflow.scm) (2))
| File `extended-example-workflow.scm' does not evaluate to a workflow value.
`----

But I had to go up to the top-level directory to get it to work.

,----
| <gwl root> $ ./pre-inst-env guix workflow -f --run=doc/examples/extended-example-workflow.scm
| Executing: /bin/sh -c /gnu/store/g5wkzwgbfgma76ycn3mwd2xmph37clhm-create-file-one.txt 
| Executing: /bin/sh -c /gnu/store/w481dn7lqafdsns416n833z4wlh1qayg-create-file-two.txt 
| Executing: /bin/sh -c /gnu/store/w9dn1h1rhladkfk4fyyjyman33vc2n44-create-file-three.txt 
| Executing: /bin/sh -c /gnu/store/z36ibjk85i4ya1liwcgq4ilng31midhn-compress-file-one.txt 
| Executing: /bin/sh -c /gnu/store/dgf3izpqq07a6zqacyq6qh5qfnk9azhz-compress-file-two.txt 
| Executing: /bin/sh -c /gnu/store/6mm7alimsdm5mdjv6gv713p2b3bhqhdi-compress-file-three.txt 
| Executing: /bin/sh -c /gnu/store/yji5pjkn9dqv9sgi0jvl1dxz4f6brcjb-list-file-one.txt.gz 
| Executing: /bin/sh -c /gnu/store/7d7bkih2qj03gs36b7nzjvf8calw65xn-list-file-two.txt.gz 
| Executing: /bin/sh -c /gnu/store/fvyb0awbfd6jmj74hjf2agm0wq6i8866-list-file-three.txt.gz
`----

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

* Re: Some doc/examples files incompatible with latest update
  2019-06-12 13:37   ` Kyle Meyer
@ 2019-06-14 13:52     ` Ricardo Wurmus
  0 siblings, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2019-06-14 13:52 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: gwl-devel


Hi Kyle,

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>>> | ERROR: In procedure scm-error:
>>> | No applicable method for #<<accessor> workflow-processes* (1)> in call
>>> | (workflow-processes* #<unspecified>)
>>
>> “load-workflow” now prints an understandable error message when the file
>> it loads does not evaluate to a workflow.
>
> Thanks.
>
> Should simple-wisp.w also be updated to evaluate to a workflow
> (something along the lines of the patch I included with my first email)?

I’ve got some WIP for that, but I’m still working on fixing / improving
the behaviour of “containerize”.

> Right, that was one thing.  Another thing I hit into is the assumption
> that the workflow is executed from a particular location, which is
> presumably an interaction between loading extended-example-workflow.scm
> and its `(include "example-workflow.scm")'.

I had already fixed this locally but didn’t push my changes.  The new
approach is to use “load-workflow”.  It looks for workflows relative to
the location where it is invoked (unless it’s a sub-directory of the GWL
and pre-inst-env is used, so copy the examples).

In the next couple of days I’ll update this.

-- 
Ricardo

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

end of thread, other threads:[~2019-06-14 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12  4:03 Some doc/examples files incompatible with latest update Kyle Meyer
2019-06-12  9:41 ` Ricardo Wurmus
2019-06-12 13:37   ` Kyle Meyer
2019-06-14 13:52     ` Ricardo Wurmus

unofficial mirror of gwl-devel@gnu.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/gwl/0 gwl/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 gwl gwl/ https://yhetil.org/gwl \
		gwl-devel@gnu.org
	public-inbox-index gwl

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.gwl


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git