GenericIOError printing

27 views
Skip to first unread message

Stepan Koltsov

unread,
Aug 13, 2012, 2:26:30 PM8/13/12
to clay-l...@googlegroups.com
Hi.

Code:

```
import io.errors.*;
import printer.*;

main() {
    println(GenericIOError(2));
}
```

prints, as expected:

```
error(2): No such file or directory
```

But code

```
import printer.*;
import io.errors.*;

main() {
    println(GenericIOError(2));
}
```

prints

```
GenericIOError(2)
```

Is is possible to change library code some way to make sure that GenericOError is always printed with error message despite of import order?

--
Stepan Koltsov

Joe Groff

unread,
Aug 17, 2012, 4:56:57 PM8/17/12
to clay-l...@googlegroups.com
At a glance, since io.errors loads printer, the user-level import
order shouldn't matter since the dependency graph should be the same
in either case. Maybe there's an import circularity between io and
printer? Finding and breaking that circularity should fix the problem.

-Joe

Stepan Koltsov

unread,
Aug 18, 2012, 12:44:46 PM8/18/12
to clay-l...@googlegroups.com


Yes, it was cyclic dependency.

https://github.com/jckarter/clay/pull/344

--
Stepa
 
Reply all
Reply to author
Forward
0 new messages