StudioCherno/Coral

Loading an assembly from two separate context + proposal of refactor

antopilo opened this issue · 1 comments

Problem

It should be possible to load the same assembly from two separate context.

Cause

The fact the the assembly cache is global(static) and the fact the the assembly is derived from its name prevents from supporting two instances of the same assembly.

Reproduce step

Example:
1- Create One ALC named "Test1"
2- Load assembly "Test.dll"

3- Create ALC named "Test2"
4- Load assembly "Test.dll"

Expected behaviour

This case should load one instance of Test.dll in both context

Proposal

The assembly loads succesfully, but when it tries to add it to the cache, it crashes because the entry already exists.

#1 refactor assembly ID to not be created from the assembly name but from its instance.
#2 make assembly cache not static or make one cache per ALC.