Skip to content

Commit 9bc48b0

Browse files
James LechtnerJames Lechtner
authored andcommitted
Revert "Merge branch 'lock-file' of https://github.com/intersystems/ipm into lock-file"
This reverts commit 449c7b2, reversing changes made to 439cc16.
1 parent 449c7b2 commit 9bc48b0

File tree

24 files changed

+823
-604
lines changed

24 files changed

+823
-604
lines changed

CHANGELOG.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
89
## [0.10.5] - Unreleased
910

1011
### Added
@@ -13,25 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1314
- #935: Adding a generic JFrog Artifactory tarball resource processor for bundling artifact with a package and deploying it to a final location on install.
1415
- #961: Adding creation of a lock file for a module by using the `-create-lockfile` flag on install.
1516

16-
### Changed
17-
- #316: All parameters, except developer mode, included with a `load`, `install` or `update` command will be propagated to dependencies
18-
- #885: Always synchronously load dependencies and let each module do multi-threading as needed
19-
to load using multicompile instead of trying to do own multi-threading of item load which causes
20-
lock contention by bypassing IRIS compiler.
21-
2217
### Removed
2318
- #938 Removed secret flag NewVersion handling in %Publish()
2419

2520
### Fixed
2621
- #943: The `load` command when used with a GitHub repository URL accepts a `branch` argument again
27-
- #701: Fix misleading help comments about `search` command
2822
- #958: Update command should not fail early if external name is used
29-
- #965: FileCopy on a directory with a Name without the leading slash now works
30-
- #937: Publishing a module with a `<WebApplication>` containing a `Path` no longer errors out
3123

3224
### Deprecated
3325
- #828: The `CheckStatus` flag for `<Invoke>` action has been deprecated. Default behavior is now to always check the status of the method if and only if the method signature returns %Library.Status
34-
- #885: `-synchronous` flag since loading dependencies synchronously is now the default behavior.
3526

3627
## [0.10.4] - 2025-10-21
3728

module.xml

Lines changed: 42 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,49 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Export generator="Cache" version="25">
3-
<Document name="ZPM.ZPM">
4-
<Module>
5-
<Name>ZPM</Name>
6-
<Version>0.10.5-SNAPSHOT</Version>
7-
<ExternalName>IPM</ExternalName>
8-
<Description>InterSystems Package Manager (IPM) provides development tools and
9-
infrastructure for defining, building, distributing, and installing modules and
10-
applications.</Description>
11-
<Keywords>Package Manager</Keywords>
12-
<Author>
13-
<Organization>InterSystems Corporation</Organization>
14-
</Author>
15-
<Packaging>module</Packaging>
16-
<SourcesRoot>src</SourcesRoot>
17-
<Resource Name="%IPM.PKG" />
18-
<Resource Name="%IPM.Common.INC" />
19-
<Resource Name="%IPM.Formatting.INC" />
20-
<Resource Name="IPM.Installer.CLS" Preload="true" />
21-
<UnitTest Name="/tests/unit_tests/" Package="Test.PM.Unit" Phase="test" />
22-
<UnitTest Name="/tests/integration_tests/" Package="Test.PM.Integration" Phase="verify" />
23-
<Invoke Class="IPM.Installer" Method="Map" Phase="Reload" When="Before" />
24-
<Invoke Class="IPM.Installer" Method="MapIfLegacy" Phase="Compile" When="After" />
25-
<Invoke Class="IPM.Installer" Method="InstallORASIfMissing" Phase="Activate"
26-
When="After" />
27-
<Invoke Class="%IPM.Main" Method="UpdateLanguageExtensions" />
28-
<Invoke Class="%IPM.Utils.Migration" Method="RunAll">
29-
<Arg>${verbose}</Arg>
30-
</Invoke>
3+
<Document name="ZPM.ZPM"><Module>
4+
<Name>ZPM</Name>
5+
<Version>0.10.5-SNAPSHOT</Version>
6+
<ExternalName>IPM</ExternalName>
7+
<Description>InterSystems Package Manager (IPM) provides development tools and infrastructure for defining, building, distributing, and installing modules and applications.</Description>
8+
<Keywords>Package Manager</Keywords>
9+
<Author>
10+
<Organization>InterSystems Corporation</Organization>
11+
</Author>
12+
<Packaging>module</Packaging>
13+
<SourcesRoot>src</SourcesRoot>
14+
<Resource Name="%IPM.PKG"/>
15+
<Resource Name="%IPM.Common.INC"/>
16+
<Resource Name="%IPM.Formatting.INC"/>
17+
<Resource Name="IPM.Installer.CLS" Preload="true" />
18+
<UnitTest Name="/tests/unit_tests/" Package="Test.PM.Unit" Phase="test"/>
19+
<UnitTest Name="/tests/integration_tests/" Package="Test.PM.Integration" Phase="verify"/>
20+
<Invoke Class="IPM.Installer" Method="Map" Phase="Reload" When="Before" />
21+
<Invoke Class="IPM.Installer" Method="MapIfLegacy" Phase="Compile" When="After" />
22+
<Invoke Class="IPM.Installer" Method="InstallORASIfMissing" Phase="Activate" When="After" />
23+
<Invoke Class="%IPM.Main" Method="UpdateLanguageExtensions" />
24+
<Invoke Class="%IPM.Utils.Migration" Method="RunAll">
25+
<Arg>${verbose}</Arg>
26+
</Invoke>
3127

32-
<!-- Requires 2022.1+ due to Embedded Python -->
33-
<SystemRequirements Version=">=2022.1" />
28+
<!-- Requires 2022.1+ due to Embedded Python -->
29+
<SystemRequirements Version=">=2022.1" />
3430

35-
<!-- List of python wheels for offline installation – oras and its transitive
36-
dependencies -->
37-
<PythonWheel Name="attrs-25.1.0-py3-none-any.whl" ExtraPipFlags="--no-deps" />
38-
<PythonWheel Name="certifi-2025.1.31-py3-none-any.whl" ExtraPipFlags="--no-deps" />
39-
<PythonWheel Name="charset_normalizer-2.1.1-py3-none-any.whl" ExtraPipFlags="--no-deps" />
40-
<PythonWheel Name="idna-3.10-py3-none-any.whl" ExtraPipFlags="--no-deps" />
41-
<PythonWheel Name="jsonschema-4.23.0-py3-none-any.whl" ExtraPipFlags="--no-deps" />
42-
<PythonWheel Name="jsonschema_specifications-2024.10.1-py3-none-any.whl"
43-
ExtraPipFlags="--no-deps" />
44-
<PythonWheel Name="oras-0.1.30-py3-none-any.whl" ExtraPipFlags="--no-deps" />
45-
<PythonWheel Name="referencing-0.36.2-py3-none-any.whl" ExtraPipFlags="--no-deps" />
46-
<PythonWheel Name="requests-2.32.3-py3-none-any.whl" ExtraPipFlags="--no-deps" />
47-
<PythonWheel Name="typing_extensions-4.12.2-py3-none-any.whl" ExtraPipFlags="--no-deps" />
48-
<PythonWheel Name="urllib3-2.3.0-py3-none-any.whl" ExtraPipFlags="--no-deps" />
31+
<!-- List of python wheels for offline installation – oras and its transitive dependencies -->
32+
<PythonWheel Name="attrs-25.1.0-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
33+
<PythonWheel Name="certifi-2025.1.31-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
34+
<PythonWheel Name="charset_normalizer-2.1.1-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
35+
<PythonWheel Name="idna-3.10-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
36+
<PythonWheel Name="jsonschema-4.23.0-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
37+
<PythonWheel Name="jsonschema_specifications-2024.10.1-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
38+
<PythonWheel Name="oras-0.1.30-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
39+
<PythonWheel Name="referencing-0.36.2-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
40+
<PythonWheel Name="requests-2.32.3-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
41+
<PythonWheel Name="typing_extensions-4.12.2-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
42+
<PythonWheel Name="urllib3-2.3.0-py3-none-any.whl" ExtraPipFlags="--no-deps"/>
4943

50-
<!-- Pure python implementation of rpds-py for offline installation or behind a
51-
firewall.
44+
<!-- Pure python implementation of rpds-py for offline installation or behind a firewall.
5245
This intentionally and necessarily masks possible installation of the real rpds-py package
5346
for the sake of working in a container environment with durable %SYS. -->
54-
<FileCopy Name="modules/python/rpds.py" Target="${mgrdir}python/rpds.py" />
55-
</Module>
56-
</Document>
57-
</Export>
47+
<FileCopy Name="modules/python/rpds.py" Target="${mgrdir}python/rpds.py"/>
48+
</Module>
49+
</Document></Export>

src/cls/IPM/CLI.cls

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,7 @@ ClassMethod %HelpForCommandExamples(
401401
/// Parses a command, validating it based on the Commands XData block and structuring output as follows:
402402
/// pCommandInfo = "<command name>"
403403
/// pCommandInfo("modifiers","<modifier-name>") = "<modifier-value>"
404-
/// pCommandInfo("modifiers","<modifier-name>","deprecated") = 0/1
405404
/// pCommandInfo("parameters","<parameter-name>") = "<parameter-value>"
406-
/// pCommandInfo("parameters","<parameter-name>","deprecated") = 0/1
407405
/// pCommandInfo("data","<data-name>") = "<data-value>"
408406
ClassMethod %ParseCommandInput(
409407
pCommandString As %String,
@@ -653,25 +651,6 @@ ClassMethod %ParseCommandInput(
653651
set tState = tPreEscapeState
654652
}
655653
}
656-
657-
// Add in deprecated info to parameters and modifiers
658-
set tCommandName = $get(pCommandInfo)
659-
if (tCommandName '= "") {
660-
for tType="parameters","modifiers" {
661-
set tKey = ""
662-
while 1 {
663-
set tKey = $order(pCommandInfo(tType,tKey))
664-
if (tKey = "") {
665-
quit
666-
}
667-
// Only include deprecated subscript if parameter/modifier is deprecated
668-
set tIsDeprecated = $get(tCommandStructure(tCommandName,tType,tKey,"deprecated"),0)
669-
if tIsDeprecated {
670-
set pCommandInfo(tType,tKey,"deprecated") = 1
671-
}
672-
}
673-
}
674-
}
675654
if ($get(pCommandInfo) '= "") {
676655
set commandName = pCommandInfo
677656
for i=1:1 {

src/cls/IPM/CLI/Commands.cls

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ XData Schema [ Internal, MimeType = application/xml ]
4848
<!-- Parameter required? -->
4949
<xs:attribute name="required" type="xs:boolean" use="optional" default="false"/>
5050

51-
<!-- Whether the parameter is deprecated -->
52-
<xs:attribute name="deprecated" type="xs:boolean" use="optional" default="false"/>
53-
5451
<!-- Description of what this parameter does -->
5552
<xs:attribute name="description" type="string" use="optional"/>
5653

@@ -95,19 +92,16 @@ XData Schema [ Internal, MimeType = application/xml ]
9592
<!-- Modifier name -->
9693
<xs:attribute name="name" type="string" use="required"/>
9794

98-
<!-- Modifier required -->
95+
<!-- Modifier name -->
9996
<xs:attribute name="required" type="xs:boolean" use="optional" default="false"/>
10097

101-
<!-- Whether the modifier is deprecated -->
102-
<xs:attribute name="deprecated" type="xs:boolean" use="optional" default="false"/>
103-
10498
<!-- Comma-separated list of aliases -->
10599
<xs:attribute name="aliases" type="string" use="optional"/>
106100

107101
<!-- If true, the modifier name is followed in the command string by a value -->
108102
<xs:attribute name="value" type="xs:boolean" use="optional" default="false"/>
109103

110-
<!-- Description of the modifier -->
104+
<!-- If true, the modifier name is followed in the command string by a value -->
111105
<xs:attribute name="description" type="string" use="optional"/>
112106

113107
<!-- If set, this provides a fixed list of valid values for the modifier -->
@@ -165,7 +159,7 @@ XData Schema [ Internal, MimeType = application/xml ]
165159
</xs:schema>
166160
}
167161

168-
/// Turns the Command XData block into a subscripted array as follows:
162+
/// Turns the Comomand XData block into a subscripted array as follows:
169163
/// pCommandStructure(1, "<alias>") = "<command name>"
170164
/// pCommandStructure("<command-name>") ->
171165
/// "description" = describes the command
@@ -179,13 +173,11 @@ XData Schema [ Internal, MimeType = application/xml ]
179173
/// "aliases" = aliases for the modifier
180174
/// "description" = describes the modifier
181175
/// "required" = whether or not modifier is required for the command
182-
/// "deprecated" = whether or not modifier is deprecated for the command
183176
/// "trailing" = whether modifier is a trailing modifier
184177
/// "parameters":
185178
/// "<parameter>":
186179
/// "description" = description of parameter
187180
/// "required" = is parameter required
188-
/// "deprecated" = whether or not parameter is deprecated for the command
189181
ClassMethod %GetOneCommandStructure(Output pCommandStructure) [ CodeMode = objectgenerator ]
190182
{
191183
#define DefaultGroup "-"
@@ -323,10 +315,9 @@ ClassMethod %GetOneCommandStructure(Output pCommandStructure) [ CodeMode = objec
323315
do %code.WriteLine(" Set pCommandStructure("_tName_","_$$$QUOTE(tMap(tCommChild))_") = "_tDescContent)
324316
}
325317
} else {
326-
// Common to both modifier and parameter
318+
// Common: name, required, description
327319
set tChildName = $$$QUOTE(tMap(tCommChild,"a","name"))
328320
set tRequired = $case($get(tMap(tCommChild,"a","required")),"true":1,:0)
329-
set tDeprecated = $case($get(tMap(tCommChild,"a","deprecated")),"true":1,:0)
330321

331322
if (tMap(tCommChild) = "modifier") {
332323
// Also: aliases, value, valueList
@@ -346,19 +337,17 @@ ClassMethod %GetOneCommandStructure(Output pCommandStructure) [ CodeMode = objec
346337
do %code.WriteLine(" Set pCommandStructure("_tName_",""modifiers"","_tChildName_",""group"") = "_tGroupName)
347338
do %code.WriteLine(" Set pCommandStructure("_tName_",""modifiers"","_tChildName_",""value"") = "_$case(tValue,"true":1,:0))
348339
do %code.WriteLine(" Set pCommandStructure("_tName_",""modifiers"","_tChildName_",""required"") = "_tRequired)
349-
do %code.WriteLine(" Set pCommandStructure("_tName_",""modifiers"","_tChildName_",""deprecated"") = "_tDeprecated)
350340
do:(tDesc'=$$$empty) %code.WriteLine(" Set pCommandStructure("_tName_",""modifiers"","_tChildName_",""description"") = "_tDesc)
351341
do:(tValueList'=$$$empty) %code.WriteLine(" Set pCommandStructure("_tName_",""modifiers"","_tChildName_",""valueList"") = "_tValueList)
352342
do:(tDataAlias'=$$$empty) %code.WriteLine(" Set pCommandStructure("_tName_",""modifiers"","_tChildName_",""dataAlias"") = "_tDataAlias)
353343
do:(tDataValue'=$$$empty) %code.WriteLine(" Set pCommandStructure("_tName_",""modifiers"","_tChildName_",""dataValue"") = "_tDataValue)
354-
} elseif (tMap(tCommChild) = "parameter") {
344+
} elseif (tMap(tCommChild) = "parameter") {
355345
// Also: example
356346
set tExample = $$$QUOTE($get(tMap(tCommChild,"a","example")))
357347
set tTrailing = $case($get(tMap(tCommChild,"a","trailing")),"true":1,:0)
358348
do %code.WriteLine(" Set pCommandStructure("_tName_",""parameters"",$i(pCommandStructure("_tName_",""parameters""))) = "_tChildName)
359349
do %code.WriteLine(" Set pCommandStructure("_tName_",""parameters"","_tChildName_",""trailing"") = "_tTrailing)
360350
do %code.WriteLine(" Set pCommandStructure("_tName_",""parameters"","_tChildName_",""required"") = "_tRequired)
361-
do %code.WriteLine(" Set pCommandStructure("_tName_",""parameters"","_tChildName_",""deprecated"") = "_tDeprecated)
362351
do:(tDesc'=$$$empty) %code.WriteLine(" Set pCommandStructure("_tName_",""parameters"","_tChildName_",""description"") = "_tDesc)
363352
do:(tExample'=$$$empty) %code.WriteLine(" Set pCommandStructure("_tName_",""parameters"","_tChildName_",""example"") = "_tExample)
364353
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
Include %IPM.Common
2+
3+
Class %IPM.General.InstallContext Extends %IPM.General.Singleton
4+
{
5+
6+
/// If set to 1, calls to %Get must return an instance of this class created in the current namespace; a new instance will be created if none exists.
7+
Parameter NAMESPACESCOPE As BOOLEAN = 1;
8+
9+
Property DependencyGraph [ MultiDimensional, Private ];
10+
11+
Property CacheTempIndex As %Integer [ Private ];
12+
13+
Method SetGraph(ByRef pDependencyGraph)
14+
{
15+
kill ..DependencyGraph
16+
merge ..DependencyGraph = pDependencyGraph
17+
}
18+
19+
Method SetCacheTempIndex(pIndex As %Integer = "")
20+
{
21+
set ..CacheTempIndex = pIndex
22+
}
23+
24+
Method GetModuleList() As %List
25+
{
26+
set tList = ""
27+
set tModuleName = ""
28+
for {
29+
set tModuleName = $order(..DependencyGraph(tModuleName))
30+
if (tModuleName = "") {
31+
quit
32+
}
33+
set tList = tList_$listbuild(tModuleName)
34+
}
35+
quit tList
36+
}
37+
38+
Method ModuleIsDependency(pModuleName As %String) As %Boolean
39+
{
40+
quit ($data(..DependencyGraph(pModuleName)) > 0)
41+
}
42+
43+
Method GetPendingModuleList() As %List
44+
{
45+
if (..CacheTempIndex = "") {
46+
quit ""
47+
}
48+
49+
// The caller should have the temp global locked, but just in case...
50+
merge tGraph = $$$ZPMTempLoadGraph(..CacheTempIndex)
51+
52+
set tList = ""
53+
set tModuleName = ""
54+
for {
55+
set tModuleName = $order(tGraph(tModuleName))
56+
if (tModuleName = "") {
57+
quit
58+
}
59+
set tList = tList_$listbuild(tModuleName)
60+
}
61+
quit tList
62+
}
63+
64+
Method ModuleIsPending(pModuleName As %String) As %Boolean
65+
{
66+
if (..CacheTempIndex = "") {
67+
quit 0
68+
}
69+
quit ($data($$$ZPMTempLoadGraph(..CacheTempIndex,pModuleName)) > 0)
70+
}
71+
72+
}

0 commit comments

Comments
 (0)