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

Add support for aliased references #40

Closed
kzu opened this issue Nov 18, 2022 · 0 comments · Fixed by #41
Closed

Add support for aliased references #40

kzu opened this issue Nov 18, 2022 · 0 comments · Fixed by #41
Labels
enhancement New feature or request

Comments

@kzu
Copy link
Contributor

kzu commented Nov 18, 2022

Whenever type name collisions exist, .NET offers aliases to disambiguate.
For example, you can add the Aliases metadata to a project reference as follows:

    <ProjectReference Include="..\Library1\Library1.csproj" Aliases="Library1" />
    <ProjectReference Include="..\Library2\Library2.csproj" Aliases="Library2" />

Then code must use:

extern alias Library1;
extern alias Library2;

To reference types in one or the other, even if the types have the exact same full name,
the compiler will be able to disambiguate.

Currently, we do not even process references that have aliases, meaning no services
will be registered at all. We should do so, and emit code that can compile by also
including the extern alias declarations as needed.

kzu added a commit that referenced this issue Nov 18, 2022
We need to update the way we emit full names, and also add extern aliases to the generated source file.

Closes #40
kzu added a commit to devlooped/Dynamically that referenced this issue Nov 18, 2022
kzu added a commit to devlooped/Dynamically that referenced this issue Nov 18, 2022
kzu added a commit that referenced this issue Nov 18, 2022
We need to update the way we emit full names, and also add extern aliases to the generated source file.

Closes #40
kzu added a commit to devlooped/Dynamically that referenced this issue Nov 18, 2022
@kzu kzu closed this as completed in #41 Nov 18, 2022
kzu added a commit that referenced this issue Nov 18, 2022
We need to update the way we emit full names, and also add extern aliases to the generated source file.

Closes #40
@kzu kzu added the enhancement New feature or request label Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant