diff --git a/CHANGELOG.md b/CHANGELOG.md index c8198a23..b5201947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix Revert not syncing files with IRIS (#789) - Fix "Export All" stopping prematurely because a tracked item no longer exist in the namespace (#821) - Import All now outputs a warning instead of an error when an item is in the wrong path (#291) +- Fixed an error where classes with compilation errors would revert to broken versions on export (#830) ## [2.12.2] - 2025-07-08 diff --git a/cls/SourceControl/Git/Production.cls b/cls/SourceControl/Git/Production.cls index c40c1eeb..56a4e4c9 100644 --- a/cls/SourceControl/Git/Production.cls +++ b/cls/SourceControl/Git/Production.cls @@ -386,16 +386,16 @@ ClassMethod IsProductionClass(className As %String, nameMethod As %String) As %B set filename = $classmethod(##class(%Studio.SourceControl.Interface).SourceControlClassGet(), nameMethod, className_".CLS") if ##class(%File).Exists(filename) && '##class(%File).DirectoryExists(filename) && (##class(%File).GetFileSize(filename) '= 0) { try { - set ^||%oddDEF=1 + set ^||%oddDEF(className) = "" $$$ThrowOnError($system.OBJ.Load(filename, "-d")) // class XDatas are stored in ^||%oddDEF("","x","") after temp load set hasProdDef = $data(^||%oddDEF(className,$$$cCLASSxdata,"ProductionDefinition")) - kill ^||%oddDEF + kill ^||%oddDEF(className) if hasProdDef { return 1 } } catch err { - kill ^||%oddDEF + kill ^||%oddDEF(className) throw err } }