xamarin-macios icon indicating copy to clipboard operation
xamarin-macios copied to clipboard

Setting UseInterpreter=True continues to link out code

Open mattleibow opened this issue 2 years ago • 5 comments

Steps to Reproduce

  1. File | New | iOS/Maui
  2. Set UseInterpreter=True
  3. Observe the linker kick in and types being removed

Related to these PRs:

  • https://github.com/dotnet/maui/pull/8423
  • https://github.com/dotnet/maui/pull/8450

Expected Behavior

No linking.

Actual Behavior

Linking.

mattleibow avatar Jul 01 '22 15:07 mattleibow

I'm not sure this is correct to change.

Do you need the linker off because it removes types required by hot reload to work?

rolfbjarne avatar Jul 01 '22 15:07 rolfbjarne

Primarily, yes. But isn't this needed for C# hot reload too?

mattleibow avatar Jul 01 '22 16:07 mattleibow

Enabling the interpreter doesn't mean the linker has to be disabled, interpreted code works just fine.

But if hot reload requires the linker to be off, then the deciding factor should be whether hot reload is enabled or not - so I guess the question is whether there's a way to detect if hot reload is enabled or not?

rolfbjarne avatar Jul 01 '22 16:07 rolfbjarne

@drasticactions Is there a way to detect this?

I am also not sure if this really needs to live in our targets but MAUI.

dalexsoto avatar Jul 01 '22 18:07 dalexsoto

And this bug is bouncing again from may 2022. We are in August 2022. And it's still making the maui/ios debugging xp unacceptable.

You may be right. It may be a maui thing as hot reload is a xaml only thing.
But please, then, move that issue to the maui repo. Don't let it sit here.

softlion avatar Aug 06 '22 08:08 softlion

This should be mitigated by https://github.com/dotnet/maui/pull/8450

dalexsoto avatar Sep 06 '22 13:09 dalexsoto

This was solved in MAUI: https://github.com/dotnet/maui/pull/8450

rolfbjarne avatar Sep 06 '22 13:09 rolfbjarne