[Swift-user] Error: Attempted to close nonexistent channel buffers
Ben Clifford
benc at hawaga.org.uk
Thu Sep 13 16:17:00 CDT 2007
I just tried two different kinds of argument mismatch with r1213 and I
don't get this error - I get different ones:
i) with too many args in the function declaration / not enough in the
invocation:
type messagefile;
(messagefile t) greeting(int monkeys) {
app {
echo "hello" stdout=@filename(t);
}
}
messagefile outfile <"001-echo.out">;
outfile = greeting();
gives:
$ swift nec.swift
Swift v0.2-dev r1213 (modified locally)
RunID: pi3drupzxfh12
Execution failed:
Missing argument monkeys for sys:element(t, monkeys)
and the other way round, too many in the function declaration, not enough
in the invocation:
type messagefile;
(messagefile t) greeting() {.
app {
echo "hello" stdout=@filename(t);
}
}
messagefile outfile <"001-echo.out">;
outfile = greeting("monkeys");
gives
$swift nec.swift
Swift v0.2-dev r1213 (modified locally)
RunID: 7q7d6rygrl180
Execution failed:
Illegal extra argument to greeting @ nec.kml, line: 44
On Thu, 13 Sep 2007, Mihael Hategan wrote:
> Hmm. Do you have a simple example that triggers it?
>
> On Thu, 2007-09-13 at 15:29 -0500, Veronika Nefedova wrote:
> > actually, this error shows up when there is a mismatch between input/
> > output lists in declaration and in the function call. I've seen this
> > error today - the number of parameters didn't match in declaration
> > and actual function call. Once it was fixed, the error went away.
> >
> > Nika
> >
> > On Sep 13, 2007, at 3:22 PM, Mihael Hategan wrote:
> >
> > > What version are you using?
> > > That error shows a bug in the Swift implementation, and it should have
> > > been fixed, at least in SVN.
> > >
> > > Mihael
> > >
> > > On Thu, 2007-09-13 at 14:36 -0400, Allen, M. David wrote:
> > >> Hello,
> > >>
> > >> I'm just getting started with Swift, and trying to program a fairly
> > >> trivial sample to get started.
> > >>
> > >> My swiftscript fails with the message:
> > >> "Execution failed:
> > >> grep started
> > >> Attempted to close nonexistent channel buffers"
> > >>
> > >> Can anyone point me to the documentation that describes such errors?
> > >> This is referring to a spot in my code that is executing a very
> > >> vanilla grep operation. My input file is just 14 lines long, and
> > >> this
> > >> error consistently happens towards the end of the overall workflow
> > >> execution.
> > >>
> > >> The code:
> > >>
> > >> type blog {
> > >> string name;
> > >> string feedURL;
> > >> }
> > >>
> > >> type file { }
> > >>
> > >> (file headlines) getHeadlines(blog b) {
> > >> app {
> > >> feeder @b.feedURL stdout=@filename(headlines);
> > >> }
> > >> }
> > >>
> > >> (file results[]) processBlogs(blog blogs[]) {
> > >>
> > >> foreach blog el, index in blogs {
> > >> results[index] = getHeadlines( el ) ;
> > >> }
> > >> }
> > >>
> > >> (string matches) findSingleMatch(file input, string searchTerm) {
> > >> app {
> > >> grep "-i" searchTerm @filename(input)
> > >> stdout=@matches;
> > >> }
> > >> }
> > >>
> > >> (file matches) findMatches(file inputs[], string searchTerm) {
> > >> string final;
> > >>
> > >> foreach input, index in inputs {
> > >> string intermed = findSingleMatch(input, searchTerm);
> > >> final = strcat(final, intermed);
> > >> }
> > >>
> > >> matches = dumpString(final);
> > >> }
> > >>
> > >> (int retVal) debug(string m) {
> > >> app {
> > >> echo m ;
> > >> }
> > >> }
> > >>
> > >> (file t) dumpString(string m) {
> > >> app {
> > >> echo m stdout=@filename(t);
> > >> }
> > >> }
> > >>
> > >> blog blogs[] <csv_mapper; file="blogs.csv", delim=",",
> > >> header="true">;
> > >> file output[] <simple_mapper;
> > >> prefix="output/blogHeadlines",suffix=".txt">;
> > >> file final <simple_mapper; prefix="output/result", suffix=".txt">;
> > >>
> > >> output = processBlogs(blogs);
> > >> final = findMatches(output, "ARG 0");
> > >>
> > >> Any help would be greatly appreciated.
> > >> --
> > >> M. David Allen
> > >> _______________________________________________
> > >> Swift-user mailing list
> > >> Swift-user at ci.uchicago.edu
> > >> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
> > >
> > > _______________________________________________
> > > Swift-user mailing list
> > > Swift-user at ci.uchicago.edu
> > > http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
> > >
> >
>
> _______________________________________________
> Swift-user mailing list
> Swift-user at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
>
>
More information about the Swift-user
mailing list