[Improvement]: Simplify the package locking mode deriving logic #42706
Labels
Area/ProjectAPI
Team/DevTools
Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs )
Type/Improvement
Description
The package locking mode resolution has been distributed among different classes during the package resolution. While this works without any issues, it's a bit confusing. It impacts the readability and the maintainability of the code base.
Describe your problem(s)
In
PackageResolution.java
, the locking mode resolution logic is as follows.However, in
io.ballerina.projects.internal.ResolutionEngine#resolveDirectDependencies
andio.ballerina.projects.internal.ResolutionEngine#getRequestForUnresolvedNode
, we have added an additional check to check ifsticky
flag is on.Describe your solution(s)
Instead, we can unify this to be in
PackageResolution
as follows.Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: