Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support concrete type projection wiring #764

Open
neko-kai opened this issue Dec 3, 2019 · 1 comment
Open

Support concrete type projection wiring #764

neko-kai opened this issue Dec 3, 2019 · 1 comment

Comments

@neko-kai
Copy link
Member

neko-kai commented Dec 3, 2019

After #741 distage loses the ability to wire type projection bindings like this:

class Path {
  class A
}

val module = new ModuleDef {
  make[Path#A]
  make[Path]
}

Injector()
  .produceUnsafe(module, GCMode.NoGC)
  .get[Path#A]

This will currently fail to compile because of a bad constructor being generated at make[Path#A]. Constructor macros in izumi.distage.constructors.* should be altered to take into account non-value prefixes and summon them accordingly, i.e. instead of generating this constructor:

{ () => new Path#A }

generate this constructor:

{ (path: Path) => new path.A }
@neko-kai neko-kai added this to the 0.10 milestone Dec 3, 2019
@neko-kai neko-kai added this to To do in DIStage via automation Dec 3, 2019
@neko-kai neko-kai changed the title Support type projection wiring after 0.10 Support concrete type projection wiring after 0.10 Dec 5, 2019
@neko-kai neko-kai modified the milestones: 0.10, 0.11 Dec 5, 2019
@neko-kai neko-kai changed the title Support concrete type projection wiring after 0.10 Support concrete type projection wiring Jan 14, 2020
@neko-kai neko-kai modified the milestones: 0.12, 0.11 Jan 14, 2020
@pshirshov
Copy link
Member

I guess we may just throw a readable error message and not spend time on implementing support for deprecated projections.

@pshirshov pshirshov modified the milestones: 1.1, 1.3 Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
DIStage
  
To do
Development

No branches or pull requests

2 participants