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

Upgraded to net7.0, updated deps, enabled all WASM optimizations #117

Merged
merged 32 commits into from
Aug 17, 2023

Conversation

Arlodotexe
Copy link
Member

@Arlodotexe Arlodotexe commented Aug 1, 2023

This PR:

  • Closes Update all projects to use .NET 7 where available #12
  • Closes Update Uno.Wasm.Bootstrap to latest version 7.x #13
  • Moves us away from the Xamarin TFMs in favor of the new .NET 7 TFMs supported by Uno.
  • Updates Uno dependencies to the latest stable versions
  • Enables as many WASM optimizations as we reasonably can:
    • Enables MultiThreading (with a portable SharedArrayBuffer workaround)
    • Enables resource compression
    • Enables XAML resource trimming
    • Enables the JIT in interpreter mode.
    • Enables up to 4GB of RAM usage
    • No form of AOT has been enabled. Needs additional testing and fixes.
  • Updates UseTargetFrameworks to take the same values as the <MultiTarget> property for the -targets parameter.
  • Updates uno-check to the latest version
  • Unifies the versions in Uno.props
  • Enables a new warning when you try to build a component with a disabled but supported TargetFramework.

Merging this PR will have a few knock-on effects:

  • Any codebase consuming this tooling repo will need to be adjusted to account for the new nullable annotations and analyzers added between netstandard2.0 and net7.0.
  • Users consuming our Labs or 8.x preview packages in an Uno project will need to upgrade their Uno libraries and heads to at least .NET 7 to continue using the Toolkit.

@Arlodotexe Arlodotexe added enhancement New feature or request breaking change 💥 Introduces breaking changes Uno Issues related to Uno Platform WASM Bugs related to working with WASM/Codespaces labels Aug 1, 2023
Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is surprisingly straight-forward looking in the end... 🤞 We'll want to do some tests against the Windows/Labs-Windows repos with these changes as well first too.

Few comments from looking at the changes, nothing major.

MultiTarget/AvailableTargetFrameworks.props Outdated Show resolved Hide resolved
MultiTarget/MultiTargetToTargetFramework.props Outdated Show resolved Hide resolved
MultiTarget/PackageReferences/Uno.props Show resolved Hide resolved
MultiTarget/UseTargetFrameworks.ps1 Show resolved Hide resolved
@michael-hawker
Copy link
Member

Good with this once we open/check the changes on the Windows repo as well.

@Arlodotexe
Copy link
Member Author

During testing, I found that the Release files created for WASM are incomplete. Seems to be missing some managed resources:

image

It works fine when built from Visual Studio, just not when hosting the release dist folder.

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go! 🎉🎉🎉

MultiTarget/MultiTargetToTargetFramework.props Outdated Show resolved Hide resolved
global.json Show resolved Hide resolved
@michael-hawker michael-hawker merged commit 3e4623e into main Aug 17, 2023
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the targets/upgrade/net7 branch August 17, 2023 16:38
@ghost
Copy link

ghost commented Nov 18, 2023

Este PR:

  • Cierra Actualice todos los proyectos para usar .NET 7 donde esté disponible #12
  • Cierra Actualice Uno.Wasm.Bootstrap a la última versión 7.x #13
  • Nos aleja de los TFM de Xamarin en favor de los nuevos TFM de .NET 7 compatibles con Uno.
  • Actualiza las dependencias de Uno a las últimas versiones estables
  • Habilita tantas optimizaciones de WASM como podamos razonablemente:
    • Habilita MultiThreading (con una solución alternativa SharedArrayBuffer portátil)
    • Habilita la compresión de recursos
    • Habilita el recorte de recursos XAML
    • Habilita el JIT en modo de intérprete.
    • Permite hasta 4 GB de uso de RAM
    • No se ha habilitado ninguna forma de AOT. Necesita pruebas y correcciones adicionales.
  • Se actualiza para tomar los mismos valores que la propiedad del parámetro.UseTargetFrameworks``<MultiTarget>``-targets
  • Actualizaciones a la última versiónuno-check
  • Unifica las versiones en Uno.props
  • Habilita una nueva advertencia al intentar compilar un componente con un TargetFramework deshabilitado pero compatible.

La combinación de esta solicitud de incorporación de cambios tendrá algunos efectos colaterales:

  • Cualquier código base que consuma este repositorio de herramientas deberá ajustarse para tener en cuenta las nuevas anotaciones y analizadores que aceptan valores NULL agregados entre y .netstandard2.0``net7.0
  • Los usuarios que consuman nuestros Labs o paquetes de vista previa 8.x en un proyecto de Uno deberán actualizar sus bibliotecas de Uno y dirigirse al menos a .NET 7 para seguir usando el kit de herramientas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change 💥 Introduces breaking changes enhancement New feature or request Uno Issues related to Uno Platform WASM Bugs related to working with WASM/Codespaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Uno.Wasm.Bootstrap to latest version 7.x Update all projects to use .NET 7 where available
2 participants