Adam Warski

Results 549 comments of Adam Warski

MacWire always uses the primary constructor - and that's currently hard-coded. I suspect that's a Java class that you are trying to wire? I'm afraid that in this case you'll...

I think in Scala usually (at least from my experience) you have a single constructor or the constructor that you want to use is the primary one. That's just due...

Actually, I'm not sure how MacWire would behave with default arguments. Something to test :)

I think that it's fine as is now - taking into account default values could create confusion - but I'll leave the issue open for now if others would have...

For now this is "fixed" by adding `--add-opens java.base/java.lang=ALL-UNNAMED` to `JAVA_OPTS` for java9+ builds. I think a proper fix would involve adding a `module-info.java` which would expose the test package...

Hm, I'm not convinced. I'd be afraid that this might lead to confusing behavior, if a parameter is wired as `None` because it's missing for some possibly not-obvious reason.

Yes, `wireOpt` might make more sense - it explicitly states the intent. Though then, I would name it `wireOption` :)

I think `Option[Option[A]]` is suspicious, so I'd keep it without nesting

Do I understand correctly that all the errors above are compile-time? I'm not sure if I can do anything on the MacWire side, this looks like a problem in resolving...

Depending on `taxBase: Double => TaxCalculator` (the function type) doesn't work? If not, than it's a bug.