#abstract SystemBase implementation gets stripped in il2cpp and mono with 'minimal' setting

1 messages · Page 1 of 1 (latest)

pine sleet
#

I have an assembly with a bunch of blob index systems. they are implemented like this:

[UpdateInGroup(typeof(NZSpellCastingInitializationSystemGroup))]
public partial class SpellElementLoader : BlobIndexSystem<SpellElementInfoSingleton, SpellElementInfoBlobReference, SpellElementInfoBlobRoot>
{
}

The BlobIndexSystem can be found here: https://github.com/enzi/NZCore/blob/main/NZCore/Systems/BlobIndexSystem.cs

This assembly has nothing else in it, just those implementations.
I've tried adding [Preserve] to the classes and the abstract class but it didn't help.

Any idea what to do about it? It's an old system, written before generic ISystem was available. I can try my luck with a rewrite but it wouldn't solve the underlying issue.

marsh horizon
#

wait what

#

you added preserve and it stripped it??

#

also, minimal doesn't strip any user code at all period

#

how are you deciding that it's being stripped?

#

@pine sleet ^

pine sleet
#

the whole dll is missing in the Managed folder

#

the build works and the dll is generated when mono stripping level is set to disabled.

#

tested with u6 35f1 and u6 40f1 and entities 1.3.8

marsh horizon
#

fascinating. what happens if you put [assembly: AlwaysLinkAssembly]

marsh horizon
#

ok this is a legit bug for somebody, will figure out who thanks

#

i didn't know that could happen at all

pine sleet
#

should i try to get a repro going?

marsh horizon
#

if it's easy for you then sure, otherwise don't worry about it

#

my best guess is that i'm supposed to be emitting alwayslinkassembly when i find a system in the ilpp

pine sleet
#

sounds like a good rule

#

Thanks for the super fast help! I can live with the workaround for now.

marsh horizon
#

turns out we already are doing this but somehow we missed that your system was a system. investigating further

#

we may need a repro after all

pine sleet
pine sleet
#

IN-96013

Important bit that I noticed while building the repro. Putting all the source that's in the "Packages" folder into "Assets" won't trigger this bug. It's only when the code is provided as package that this bug is triggered.

marsh horizon
#

yeah that actually makes sense based on my conversation with the stripping guy

#

they added this feature where they would strip whole user assemblies even in minimal because they wanted to strip out unused package assemblies, which are pretty common with default packages

#

thanks man! should be able to track it down in a day or two

shell leaf
#

the name stripping guy doesn't command the same level of aww as the name mono man

marsh horizon
#

they are both quite awesome in actual fact, to be fair; i'll have to come up with a better name for stripping guy

shell leaf
#

not saying he's not awesome, i just feel like he's being sold short by the name stripping guy

pine sleet
#

i looked up stripping guy on google and he seems to have a very lucrative side business

pine sleet
marsh horizon
#

yes we're going to fix it

#

they just don't know about entities

#

I'll figure out who said that and explain

pine sleet
#

Exactly what I wanted to hear! Great thanks!

marsh horizon
#

oh it was the stripping guy