Hi ct --

Unfortunately, our ItemWriter expert is out of the office until mid-week 
next week, so I'm shooting in the dark a bit here.  Disconcertingly, I'm
not seeing any existing test code that exercises ItemWriter/itemWriter(),
so I expect you're bumping into a true bug.

Pattern matching in the code in question, I believe the following patch 
should fix the issue if you are able to apply it to your code (this is 
based on master, so your line numbers may vary):

diff --git a/modules/standard/IO.chpl b/modules/standard/IO.chpl
index 30246fa..6ef60e6 100644
--- a/modules/standard/IO.chpl
+++ b/modules/standard/IO.chpl
@@ -4761,7 +4761,7 @@ record ItemWriter {
    /* the locking field for our channel */
    param locking:bool;
    /* our channel */
-  var ch:channel(false,kind);
+  var ch:channel(true,kind,locking);
    /* write a single item, returning an error */
    proc write(arg:ItemType, out error:syserr):bool {
      return ch.write(arg, error=error);


In the meantime, I'll do further testing of this (not that I expect 
anything to break since nothing seems to be exercising it) and put 
together a PR for it.  If you could let me know whether it helps you make 
forward progress, that'd be great.

I'll ask the developer in question to put together some testing against
this when he returns.

Thanks for reporting this,
-Brad


On Thu, 25 Feb 2016, ct clmsn wrote:

> I'm having an issue working with ItemWriter- the following code does not
> compile:
>
> var f = openmem();
> var fw = f.writer();
> var fwiw = fw.itemWriter(int);
>
> $CHPL_HOME/modules/standard/IO.chpl:4499: In function 'itemWriter':
> $CHPL_HOME/modules/standard/IO.chpl:4501: error: unresolved type specifier
> 'channel(0, iokind)'
> $CHPL_HOME/modules/standard/IO.chpl:2588: note: candidates are:
> channel(param writing: bool, param kind: iokind, param locking: bool)
>
> I made this small modification and got a different-but-related compile
> error:
>
> var f = openmem();
> var fw = f.writer(writing=true, kind=iokind.dynamic, locking=true);
> var fwiw = fw.itemWriter(int);
>
> $CHPL_HOME/modules/standard/IO.chpl:4485: error: failed to resolve call
> with id 810495
> $CHPL_HOME/modules/standard/IO.chpl:4485: error: unresolved type specifier
> '_type_construct_channel(0, iokind)'
> $CHPL_HOME/modules/standard/IO.chpl:4485: note:   instantiated from
> _type_construct_ItemWriter
> $CHPL_HOME/modules/standard/IO.chpl:4501: note:   instantiated from
> itemWriter
> $CHPL_HOME/modules/standard/IO.chpl:2588: note: candidates are:
> _type_construct_channel(param writing: bool, param kind: iokind, param
> locking: bool) [220286]
>
> Thanks in advance for taking time to review this issue!
>
> ct
>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to