TypeLoadException: Unable to resolve type alias "("inv",[Orleans.Runtime.GrainReference]
@ReubenBond is already working on this.
Since Nov 30, 2022.
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 13h 56m
- Merged PRs (30d)
- 351
Description
Hey guys, is there some reason I can't use same method name again?
For example, Let's say I have following grain
public interface ISomeGrain : IGrainWithIntegerKey
{
Task Method();
}
and I've accidentally getting TypeLoadException: Unable to resolve type alias "("inv",[Orleans.Runtime.GrainReference] exception by changing signature like:
public interface ISomeGrain : IGrainWithIntegerKey
{
Task Method(int accidentParameter);
}
so I hot-fixed the grain by adding a new signature like:
[Version(1)]
public interface ISomeGrain : IGrainWithIntegerKey
{
Task Method();
Task NewMethod(int accidentParameter);
}
and everything went okay. (this was a painful experience tho..)
The problem is I cannot use the same method name again and wonder why is that so. I've completely deployed version 1 grain and trying to reclaim the method name back but Orleans kept throwing TypeLoadException again like interface below:
[Version(2)]
public interface ISomeGrain : IGrainWithIntegerKey
{
Task Method(int accidentParameter);
}
Here's my question:
- Why am I not allowed to use the method name of the previous version?
- Why am I not allowed to accept consequences (having side effects, being not backward compatible) but getting runtime errors instead of making silent signature changes?
I have a staging environment of 12 different hetero silos (because of microservices..) and only 2 of them got interface signature changes deployed. The one is the silo where grain got implemented and the one is the silo where we have the client (via GrainFactory) and the client is throwing TypeLoadException even if I have deployed version 2 of the grain interface on both silos.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.