You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrating libadalang 25.0.0 from libadalang 23.0.0
Calls to Libadalang.Auto_Provider.Get_Unit and Libadalang.Project_Provider.Get_Unit explicitly raise Program_Error exception.
Previously, developer was able to get a unit through the call
declare
Unit : constant Libadalang.Analysis.Analysis_Unit'Class := LAL_Auto_Unit_Provider.Get_Unit
(Context => LAL_Context,
Name => Name,
Kind => Kind);
This breaking change is related to the implementation of "PLE root" Langkit mechanism (Commit 1ab5c03 [1])
In order to maintain compatibility, Libadalang.Auto_Provider.Get_Unit and Libadalang.Project_Provider.Get_Unit could simply call the class underlying Get_Unit_And_PLE_Root, with the additional parameters Unit and PLE_Root_Index declared in the Get_Unit function scope, as proposed below instead of explicitly raising a Program_Error exception
overriding function Get_Unit
(Provider : Auto_Unit_Provider;
Context : Analysis_Context'Class;
Name : Text_Type;
Kind : Analysis_Unit_Kind;
Charset : String := "";
Reparse : Boolean := False) return Analysis_Unit'Class
is
Unit : Analysis_Unit := No_Analysis_Unit;
PLE_Root_Index : Natural := 0;
begin
Provider.Get_Unit_And_PLE_Root
(Context => Context,
Name => Name,
Kind => Kind,
Charset => Charset,
Reparse => Reparse,
Unit => Unit,
PLE_Root_Index => PLE_Root_Index);
return Unit;
end Get_Unit;
Integrating libadalang
25.0.0
from libadalang23.0.0
Calls to
Libadalang.Auto_Provider.Get_Unit
andLibadalang.Project_Provider.Get_Unit
explicitly raiseProgram_Error
exception.Previously, developer was able to get a unit through the call
within the context below
This breaking change is related to the implementation of "PLE root" Langkit mechanism (Commit
1ab5c03
[1])In order to maintain compatibility,
Libadalang.Auto_Provider.Get_Unit
andLibadalang.Project_Provider.Get_Unit
could simply call the class underlyingGet_Unit_And_PLE_Root
, with the additional parametersUnit
andPLE_Root_Index
declared in theGet_Unit
function scope, as proposed below instead of explicitly raising aProgram_Error
exception[1]
1ab5c03#diff-405ad85e9a2303876561467d05a053fd2d5173d93fc6abd0bd55fd84d36d57c1
The text was updated successfully, but these errors were encountered: