-
Notifications
You must be signed in to change notification settings - Fork 758
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
Add DependencyManifest module to the PackageManifest dependency #43524
Add DependencyManifest module to the PackageManifest dependency #43524
Conversation
moduleNames(new DependencyManifest.Package(depInPkgManifest.name(), depInPkgManifest.org(), | ||
depInPkgManifest.version())), DependencyOrigin.USER_SPECIFIED)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This moduleNames(new DependencyManifest.Package(depInPkgManifest.name(), depInPkgManifest.org(), depInPkgManifest.version()))
always returns an empty list of module names.
Can we write a test using our resource test framework? Not sure whether this is supported in the resolution framework. |
3d6bec9
to
f9a6b30
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #43524 +/- ##
=========================================
Coverage 77.55% 77.56%
- Complexity 58722 58736 +14
=========================================
Files 3447 3447
Lines 219658 219658
Branches 28915 28916 +1
=========================================
+ Hits 170365 170382 +17
+ Misses 39892 39886 -6
+ Partials 9401 9390 -11 ☔ View full report in Codecov by Sentry. |
1373d8f
to
39b32b2
Compare
Updated with a couple of tests. |
Purpose
When a package is found both in PackageManifest(Ballerina.toml) and the DependencyManifest(Dependencies.toml) we pick the dependency in the PackageManifest. This will go in the BlendedManifest. However, with that, we loose the information regarding the modules that are within the package since the user only specifies the
org
,name
,version
andrepository
(optional).When this happens to a package that has a hierarchical name (eg - resource.kind), we cannot find a module that matches the the aforementioned dependency in the BlendedManifest because when trying to compare the module names, the entry in the BlendedManifest has an empty module list.
With this fix, when the same dependency is repeated in both Dependencies.toml and the Ballerina.toml, the module details are copied from the Dependencies.toml while other details are taken from the Ballerina.toml
Fixes https://github.com/wso2-enterprise/internal-support-ballerina/issues/811
Approach
Samples
Remarks
Check List