* Creating guild bundles [bug/feature request]
@ 2011-09-04 12:24 Ian Price
2012-01-04 18:05 ` Andy Wingo
0 siblings, 1 reply; 2+ messages in thread
From: Ian Price @ 2011-09-04 12:24 UTC (permalink / raw)
To: guile-devel
Hi,
Testing out sigil last night with one of my existing projects, I came
across a snag when trying to create a bundle.
If it is not under version control, everything works normally.
$ ls
pkg−list.scm
queues.sls
README
tests.scm
$ guild create-bundle
Creating pfds_0.zip
$ unzip -l pfds_0.zip
Archive: pfds_0.zip
Length Date Time Name
−−−−−−−−− −−−−−−−−−− −−−−− −−−−
2221 09−04−2011 12:41 pfds_0/tests.scm
57 09−04−2011 12:41 pfds_0/README
380 09−04−2011 12:41 pfds_0/pkg−list.scm
2910 09−04−2011 12:41 pfds_0/queues.sls
−−−−−−−−− −−−−−−−
5568 4 files
So far, so good, but a simple 'git init' later.
$ git init
Initialized empty Git repository in /tmp/pfds/.git/
$ guild create-bundle
Creating pfds_0.zip
zip error: Nothing to do! (/tmp/pfds/pfds_0.zip)
Backtrace:
In module/ice−9/boot−9.scm:
170: 9 [catch #t #<catch−closure 9b30410> ...]
In unknown file:
?: 8 [catch−closure]
In module/ice−9/boot−9.scm:
62: 7 [call−with−prompt prompt0 ...]
In module/ice−9/eval.scm:
389: 6 [eval # #]
In /usr/local/bin/guile−tools:
68: 5 [main ("/usr/local/bin/guild" "create−bundle")]
In scripts/create−bundle.scm:
57: 4 [main]
In unknown file:
?: 3 [with−fluids⋆ (#<fluid 24>) (#) ...]
?: 2 [loop−procedure (#) (#) ()]
?: 1 [run−zip # #]
In sigil/spells/filesys.scm:
211: 0 [with−working−directory # #<procedure a1deac8 ()>]
sigil/spells/filesys.scm:211:2: In procedure with−working−directory:
sigil/spells/filesys.scm:211:2: ERROR: R6RS exception:
1. &fatal−error
2. &message: "`/usr/bin/zip' returned with unexpected status 12"
clearly not what we're after. Adding a file reveals the problem
$ git add queues.sls
$ guild create-bundle
Creating pfds_0.zip
$ unzip -l pfds_0.zip
Archive: pfds_0.zip
Length Date Time Name
−−−−−−−−− −−−−−−−−−− −−−−− −−−−
2910 09−04−2011 12:41 pfds_0/queues.sls
−−−−−−−−− −−−−−−−
2910 1 file
$ git ls-files
queues.sls
The problem is that sigil (well, list-files in (sigil actions)) is being
clever, and punts to the underlying vcs if there is one, which can lead
to ill-formed bundles if not all files are under revision control (in my
particular case, it was pkg-list.scm that was not (yet) added :). Rather
than using heuristics, I think it would be better to use pkg-list.scm
itself to decide what to bundle, but I don't think this is a priority,
as long as people know there are edge cases :).
--
Ian Price
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Creating guild bundles [bug/feature request]
2011-09-04 12:24 Creating guild bundles [bug/feature request] Ian Price
@ 2012-01-04 18:05 ` Andy Wingo
0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2012-01-04 18:05 UTC (permalink / raw)
To: Ian Price; +Cc: rotty, guile-devel
Hi Ian,
Thanks for testing the guildhall! Again, terribly sorry for the delay.
On Sun 04 Sep 2011 08:24, Ian Price <ianprice90@googlemail.com> writes:
> $ guild create-bundle
> Creating pfds_0.zip
> $ unzip -l pfds_0.zip
> Archive: pfds_0.zip
> Length Date Time Name
> −−−−−−−−− −−−−−−−−−− −−−−− −−−−
> 2221 09−04−2011 12:41 pfds_0/tests.scm
> 57 09−04−2011 12:41 pfds_0/README
> 380 09−04−2011 12:41 pfds_0/pkg−list.scm
> 2910 09−04−2011 12:41 pfds_0/queues.sls
> −−−−−−−−− −−−−−−−
> 5568 4 files
>
> So far, so good, but a simple 'git init' later.
>
> $ git init
> Initialized empty Git repository in /tmp/pfds/.git/
> $ guild create-bundle
> Creating pfds_0.zip
>
> zip error: Nothing to do! (/tmp/pfds/pfds_0.zip)
>
> The problem is that sigil (well, list-files in (sigil actions)) is being
> clever, and punts to the underlying vcs if there is one, which can lead
> to ill-formed bundles if not all files are under revision control (in my
> particular case, it was pkg-list.scm that was not (yet) added :). Rather
> than using heuristics, I think it would be better to use pkg-list.scm
> itself to decide what to bundle, but I don't think this is a priority,
> as long as people know there are edge cases :).
In the end I think the current behavior is the right thing to do, but
the problem is that the error isn't right. It gives you a big
backtrace, which is unnecessary, and it doesn't tell you that the
directory is under version control, and it should warn if there are no
files.
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-04 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-04 12:24 Creating guild bundles [bug/feature request] Ian Price
2012-01-04 18:05 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).