Fix mixed units assemblies to work, regardless of project settings (#5818)

* Add mixed units test

* Add incorrect output

* Change to always set units since old units are not accurate

* Update output after fix
This commit is contained in:
Jonathan Tran
2025-03-17 11:26:56 -04:00
committed by GitHub
parent a8b0e1a771
commit dc82b4c8ea
31 changed files with 1727 additions and 273 deletions

View File

@ -55,10 +55,9 @@ impl ExecutorContext {
for annotation in annotations {
if annotation.name() == Some(annotations::SETTINGS) {
if matches!(body_type, BodyType::Root) {
let old_units = exec_state.length_unit();
exec_state.mod_local.settings.update_from_annotation(annotation)?;
let new_units = exec_state.length_unit();
if !self.engine.execution_kind().await.is_isolated() && old_units != new_units {
if !self.engine.execution_kind().await.is_isolated() {
self.engine
.set_units(new_units.into(), annotation.as_source_range())
.await?;