-
Notifications
You must be signed in to change notification settings - Fork 28
Scope information in output array of BuildDependencyGraph() #1153
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
eb52948
dependency graph now includes information about scoped dependencies
8b286c7
fix typo, and add changelog
3415e1b
Merge branch 'main' into fix-1152
isc-cborbonm f171606
add integration test
2d382d5
Merge branch 'main' into fix-1152
isc-cborbonm fc830d5
update test files
afbef18
add transitive scoped dependency with 'verify' scope
34c5e8a
fix typos, and add scope to description of BuildDependencyGraph()
2773f48
Merge branch 'main' into fix-1152
isc-cborbonm 23ee448
remove unused parameter in
d792342
Merge branch 'main' into fix-1152
isc-cborbonm 9b72d44
remove deployed and platform version from dependency graph, which was…
f93d74e
Merge branch 'fix-1152' of https://github.com/intersystems/ipm into f…
209c693
Merge branch 'main' into fix-1152
isc-cborbonm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
tests/integration_tests/Test/PM/Integration/BuildDependencyGraphScopedDeps.cls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| Class Test.PM.Integration.BuildDependencyGraphScopedDeps Extends Test.PM.Integration.Base | ||
|
isc-kiyer marked this conversation as resolved.
|
||
| { | ||
|
|
||
| Parameter REPONAME = "build-dependency-graph-scoped-dep"; | ||
|
|
||
| Parameter MODNAME = "module-a"; | ||
|
|
||
| Property RepoPath As %String; | ||
|
|
||
| Method OnBeforeAllTests() As %Status | ||
| { | ||
| // Set up the repo path - use GetModuleDir utility | ||
| set ..RepoPath = ..GetModuleDir(..#REPONAME) | ||
|
|
||
| // Create filesystem repo pointing to test data | ||
| set sc = ##class(%IPM.Main).Shell("repo -n "_..#REPONAME_" -fs -path "_..RepoPath) | ||
| do $$$AssertStatusOK(sc,"Created"_..#REPONAME_"repo successfully.") | ||
| quit sc | ||
| } | ||
|
|
||
| Method OnAfterAllTests() As %Status | ||
| { | ||
| // Remove test repository | ||
| set sc = ##class(%IPM.Main).Shell("repo -delete -name "_..#REPONAME) | ||
| do $$$AssertStatusOK(sc,"Deleted "_..#REPONAME_"repo successfully.") | ||
| quit sc | ||
| } | ||
|
|
||
| /// BuildDependencyGraph should include scope information for scoped transitive dependencies | ||
| Method TestDependencyGraphScopedDependency() | ||
| { | ||
| do $$$AssertStatusOK(##class(%IPM.Utils.Module).LoadModuleFromDirectory(..RepoPath_..#MODNAME), "Successfully loaded module from directory.") | ||
| set module = ##class(%IPM.Storage.Module).NameOpen(..#MODNAME,,.sc) | ||
| do $$$AssertStatusOK(sc, "Successfully opened module object.") | ||
|
|
||
| // Expected dependencyGraph format: dependencyGraph(<module name>) = $listbuild(<depth>, <server>, <version>, <display name>, <scope>) | ||
| set scopes = $listbuild("test", "verify") | ||
| set sc = module.BuildDependencyGraph(.dependencyGraph, , , ,scopes) | ||
| do $$$AssertStatusOK(sc, "BuildDependencyGraph() call was successful.") | ||
|
|
||
| // Check non-scoped dependency | ||
| do $$$AssertTrue($data(dependencyGraph("module-b"))) | ||
| set $listbuild(,,,,moduleBScope) = dependencyGraph("module-b") | ||
| do $$$AssertEquals(moduleBScope, "", "module-b scope successfully checked to be empty.") | ||
|
|
||
| // Check scoped dependencies | ||
| do $$$AssertTrue($data(dependencyGraph("module-c"))) | ||
| set $listbuild(,,,,moduleCScope) = dependencyGraph("module-c") | ||
| do $$$AssertEquals(moduleCScope, "test", "module-c scope successfully checked to be 'test'.") | ||
|
|
||
| do $$$AssertTrue($data(dependencyGraph("module-d"))) | ||
| set $listbuild(,,,,moduleDScope) = dependencyGraph("module-d") | ||
| do $$$AssertEquals(moduleDScope, "verify", "module-d scope successfully checked to be 'verify'.") | ||
| } | ||
|
|
||
| } | ||
15 changes: 15 additions & 0 deletions
15
...ion_tests/Test/PM/Integration/_data/build-dependency-graph-scoped-dep/module-a/module.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Export generator="IRIS" version="26"> | ||
| <Document name="module-a.ZPM"> | ||
| <Module> | ||
| <Name>module-a</Name> | ||
| <Version>1.0.0</Version> | ||
| <Dependencies> | ||
| <ModuleReference> | ||
| <Name>module-b</Name> | ||
| <Version>^2.0.0</Version> | ||
| </ModuleReference> | ||
| </Dependencies> | ||
| </Module> | ||
| </Document> | ||
| </Export> |
19 changes: 19 additions & 0 deletions
19
...ion_tests/Test/PM/Integration/_data/build-dependency-graph-scoped-dep/module-b/module.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Export generator="IRIS" version="26"> | ||
| <Document name="module-b.ZPM"> | ||
| <Module> | ||
| <Name>module-b</Name> | ||
| <Version>2.0.0</Version> | ||
| <Dependencies> | ||
| <ModuleReference Scope="test"> | ||
| <Name>module-c</Name> | ||
| <Version>^3.0.0</Version> | ||
| </ModuleReference> | ||
| <ModuleReference Scope="verify"> | ||
| <Name>module-d</Name> | ||
| <Version>^4.0.0</Version> | ||
| </ModuleReference> | ||
| </Dependencies> | ||
| </Module> | ||
| </Document> | ||
| </Export> |
9 changes: 9 additions & 0 deletions
9
...ion_tests/Test/PM/Integration/_data/build-dependency-graph-scoped-dep/module-c/module.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Export generator="IRIS" version="26"> | ||
| <Document name="module-c.ZPM"> | ||
| <Module> | ||
| <Name>module-c</Name> | ||
| <Version>3.0.0</Version> | ||
| </Module> | ||
| </Document> | ||
| </Export> |
9 changes: 9 additions & 0 deletions
9
...ion_tests/Test/PM/Integration/_data/build-dependency-graph-scoped-dep/module-d/module.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Export generator="IRIS" version="26"> | ||
| <Document name="module-d.ZPM"> | ||
| <Module> | ||
| <Name>module-d</Name> | ||
| <Version>4.0.0</Version> | ||
| </Module> | ||
| </Document> | ||
| </Export> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.