-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default for checkPackageVersions chamnged to 0 in API
- Loading branch information
Showing
728 changed files
with
4,239 additions
and
3,300 deletions.
There are no files selected for viewing
This file contains 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 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 @@ | ||
AddNuGetDependencies←{##.AddNuGetDependencies ⍵} |
This file contains 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 |
---|---|---|
@@ -1,2 +1 @@ | ||
r←GetAliasFileContent | ||
r←##.GetAliasFileContent | ||
GetAliasFileContent←{⍺←⊢ ⋄ ⍺ ##.GetAliasFileContent ⍵} |
This file was deleted.
Oops, something went wrong.
This file contains 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 @@ | ||
GetNuGetDependencies←{⍺←⊢ ⋄ ⍺ ##.GetNuGetDependencies ⍵} |
This file contains 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 @@ | ||
GetTatinDependencies←{⍺←⊢ ⋄ ⍺ ##.GetTatinDependencies ⍵} |
This file contains 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 @@ | ||
ListNuGetDependencies←{##.ListNuGetDependencies ⍵} |
This file contains 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 @@ | ||
ListTatinDependencies←{##.ListTatinDependencies ⍵} |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
ProjectConfig←{⍺←⊢ ⋄ 1:shy←⍺ ##.ProjectConfig ⍵} | ||
ProjectConfig←{1:shy←##.ProjectConfig ⍵} |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
WriteProjectConfigFile←{⍺←⊢ ⋄ ⍺ ##.WriteProjectConfigFile ⍵} | ||
WriteProjectConfigFile←{⍺←⊢ ⋄ 1:shy←⍺ ##.WriteProjectConfigFile ⍵} |
This file contains 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 |
---|---|---|
@@ -1,33 +1,36 @@ | ||
r←AddNuGetDependencies (packages path);NuGet;ns;config;nuget_dir;configfile | ||
⍝ Either add one or more NuGet packages | ||
|
||
list←AddNuGetDependencies(packages projectFolder);NuGet;msg;cfg;nuGetFolder;package;buff;targetNamespace | ||
⍝ Add one or more NuGet packages to the NuGet-folder define in the config file of `projectFolder`. | ||
⍝ * `packages` must be either a nested vector with package names or a comma-separated list of package names | ||
⍝ * `projectFolder` must carry a Cider config files used to establish the NuGet folder.\\ | ||
⍝ Returns a list with the names that got installed or at least updated. | ||
:If 1=≡packages | ||
packages←{1↓¨(⍵∊',;')⊂⍵}';',packages | ||
packages←','(≠⊆⊢)packages | ||
:EndIf | ||
path←FilesAndDirs.EnforceSlash path | ||
|
||
'Unable to locate NuGet API' ⎕SIGNAL (0≡NuGet←FindNuGetAPI ⍬)/11 | ||
ns←path{3::0 ⋄ ⊃⍵[⍵[;2]⍳⊂⍺;1]}ListOpenProjects 0 ⍝ namespace project loaded into | ||
config←Get_JSON5 configfile←path,'/cider.config' | ||
|
||
:If 0=⎕NC 'config.CIDER.dependencies.nuget' | ||
config.CIDER.dependencies.nuget←'nuget-packages' | ||
config Put_JSON5 configfile | ||
:If IsAlias projectFolder | ||
projectFolder←GetFolderFromAlias2 projectFolder | ||
:EndIf | ||
|
||
nuget_dir←path,'/',{0::⍵ ⋄ config.CIDER.dependencies.nuget}'nuget-packages' | ||
|
||
r←NuGet.Setup nuget_dir | ||
→(∨/'error:'⍷⎕C r)⍴0 | ||
|
||
r←NuGet.Add (⊂nuget_dir),packages | ||
→(∨/'error:'⍷⎕C r)⍴0 | ||
|
||
:If ns≢0 ⍝ We have a project namespace | ||
:If 2=⎕NC 'ns' | ||
ns←⍎ns | ||
:EndIf | ||
'dotnet'ns.⎕NS'' | ||
ns.dotnet.⎕USING←NuGet.Using nuget_dir | ||
r←'NuGet dependencies established in ',(⍕ns),'.dotnet' | ||
'No Cider config file found'Assert F.Exists projectFolder,'/cider.config' | ||
cfg←ReadProjectConfigFile projectFolder | ||
nuGetFolder←projectFolder,'/',⊃GetNuGetDependencyFolders cfg | ||
targetNamespace←'' | ||
:If '='∊buff←2⊃⎕NPARTS nuGetFolder | ||
targetNamespace←{⍵↓⍨⍵⍳'='}buff | ||
nuGetFolder←(-1+≢targetNamespace)↓nuGetFolder | ||
:EndIf | ||
:If 0<≢nuGetFolder | ||
nuGetFolder←FilesAndDirs.EnforceSlash nuGetFolder ⍝ .NET requirement | ||
{}⎕MKDIR⍣(~⎕NEXISTS nuGetFolder)⊣nuGetFolder | ||
'Unable to locate NuGet API'Assert 0≢NuGet←FindNuGetAPI ⍬ | ||
msg←NuGet.Setup nuGetFolder | ||
msg Assert~∨/'error:'⍷⎕C msg | ||
list←'' | ||
:For package :In packages | ||
:Trap 99 | ||
msg←NuGet.Add(⊂nuGetFolder),⊂package | ||
:If ~∨/'error:'⍷⎕C msg | ||
list,←⊂package | ||
:EndIf | ||
:EndTrap | ||
:EndFor | ||
:EndIf | ||
⍝Done |
This file contains 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 |
---|---|---|
@@ -1,4 +1,15 @@ | ||
r←AddTatinDependencies(packageIDs targetFolder) | ||
⍝ Add one or more Tatin packages as dependencies | ||
r←AddTatinDependencies(packageIDs projectFolder dev);targetFolder;cfg;ref | ||
⍝ Add one or more Tatin packages as dependencies. | ||
⍝ `dev` is a flag that decides whether `dependencies` or `dependencies_dev` is the target. | ||
:If 1<≡packageIDs | ||
packageIDs←⊃1↓,/',',¨packageIDs | ||
:EndIf | ||
cfg←ReadProjectConfigFile projectFolder | ||
:If dev | ||
ref←cfg.CIDER.dependencies_dev | ||
:Else | ||
ref←cfg.CIDER.dependencies | ||
:EndIf | ||
targetFolder←projectFolder,'/',{⍵↑⍨¯1+⍵⍳'='}ref.tatin | ||
r←⎕SE.Tatin.InstallPackages packageIDs targetFolder | ||
⍝Done |
This file contains 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 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 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 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 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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
A←APLTreeUtils2 | ||
F←FilesAndDirs | ||
C←CommTools | ||
G←APLTreeUtils2 | ||
G←APLGit2 |
This file contains 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 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 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 |
---|---|---|
@@ -1,15 +1,13 @@ | ||
parms←(fns GetFolderFromAlias)parms;data;alias;msg;alias_;folder | ||
⍝ Translates the alias in "folder" (if any) into a path from a parameter namespace.\\ | ||
⍝ If an alias is defined it is saved, possibly by overwriting the old one. | ||
:If '[]'≡parms.folder[1,≢parms.folder] | ||
alias←parms.folder~'[]' | ||
⍝ Translates the alias in "folder" (if any) into a path from a parameter namespace and save | ||
⍝ the folder in parms under the name "folder".\\ | ||
⍝ If the alias is unknown an error is thrown.\\ | ||
:If IsAlias parms.folder | ||
alias←1↓¯1↓parms.folder | ||
folder←GetFolderFromAlias2 alias | ||
:If 0<≢folder | ||
parms.folder←folder | ||
:If 0=≢parms.alias | ||
parms.alias←alias | ||
:EndIf | ||
:Else | ||
(alias,'" is not a valid alias')⎕SIGNAL 11 | ||
('"',alias,'" is not a valid alias')Assert 0<≢folder | ||
parms.folder←folder | ||
:If 0=≢parms.alias | ||
parms.alias←alias | ||
:EndIf | ||
:EndIf |
This file contains 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 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 @@ | ||
r←name GetNuGetDependencies config;ref | ||
⍝ Use this to return the content of "nuget" in either "dependencies" or "dependencies_dev" (defined by "name") | ||
⍝ but an empty vector in case the "nuget" sub-key does not exist | ||
r←'' | ||
:If 0<config.CIDER.⎕NC name | ||
ref←config.CIDER.⍎name | ||
:AndIf 0<ref.⎕NC'nuget' | ||
r,←ref⍎'nuget' | ||
:EndIf |
This file contains 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,8 @@ | ||
r←GetNuGetDependencyFolders config | ||
⍝ Returns a vector of two-item vectors with (path namespaceName) from the project `config` namespace. | ||
⍝ `r` might be empty in case there are no Tatin dependencies, otherwise it is a vector character vectors | ||
⍝ with relative path and optionally the name of a target namespace (separated by "="). | ||
⍝ Returns a nested vector in case we extend it for development one day. | ||
r←'' | ||
r,←⊂'dependencies'GetNuGetDependencies config | ||
r~←⊂'' |
This file contains 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
3 changes: 2 additions & 1 deletion
3
APLSource/Cider/GetDependencies.aplf → APLSource/Cider/GetTatinDependencies.aplf
This file contains 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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
r←name GetDependencies config;ref | ||
r←name GetTatinDependencies config;ref | ||
⍝ Use this to return the content of "tatin" in either "dependencies" or "dependencies_dev" (defined by "name") | ||
⍝ but an empty vector in case the "tatin" sub-key does not exist | ||
r←'' | ||
:If 0<config.CIDER.⎕NC name | ||
ref←config.CIDER.⍎name | ||
:AndIf 0<ref.⎕NC'tatin' | ||
r,←ref⍎'tatin' | ||
:EndIf |
6 changes: 3 additions & 3 deletions
6
...ource/Cider/GetTatinDepedencyFolders.aplf → ...urce/Cider/GetTatinDependencyFolders.aplf
This file contains 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
r←GetTatinDepedencyFolders config | ||
r←GetTatinDependencyFolders config | ||
⍝ Returns a vector of two-item vectors with (path namespaceName) from the project `config` namespace. | ||
⍝ `r` might be empty in case there are no Tatin dependencies, otherwise it is a vector character vectors | ||
⍝ with relative path and optionally the name of a target namespace (separated by "="). | ||
r←'' | ||
r,←⊂'dependencies'GetDependencies config | ||
r,←⊂'dependencies_dev'GetDependencies config | ||
r,←⊂'dependencies'GetTatinDependencies config | ||
r,←⊂'dependencies_dev'GetTatinDependencies config | ||
r~←⊂'' |
This file contains 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 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,8 @@ | ||
InitPackage;⎕TRAP | ||
⍝ Executed by Tatin when the Cider package is loaded | ||
CreateRefs | ||
:If 0 | ||
⎕TRAP←0 'S' | ||
∘∘∘ ⍝TODO⍝ | ||
:EndIf | ||
⍝Done |
This file contains 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,2 @@ | ||
r←IsAlias path | ||
r←']['≡2↑¯1⌽path |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
r←ListNuGetDependencies path;NuGet;nuget_dir | ||
⍝ List NuGet Dependencies (what a useful comment!) | ||
|
||
NuGet←FindNuGetAPI '' | ||
nuget_dir←path,'/',{0::⍵ ⋄ config.CIDER.dependencies.nuget}'nuget-packages' | ||
:If ⎕NEXISTS nuget_dir | ||
r←NuGet.Packages nuget_dir | ||
:Else | ||
r←'No dependencies found' | ||
r←ListNuGetDependencies projectFolder;NuGet;cfg;nuGetFolder | ||
r←0 2⍴'' | ||
NuGet←FindNuGetAPI'' | ||
:If IsAlias projectFolder | ||
projectFolder←GetFolderFromAlias2 projectFolder | ||
:EndIf | ||
'No Cider config file found'Assert F.Exists projectFolder,'/cider.config' | ||
cfg←ReadProjectConfigFile projectFolder | ||
:If 0<≢nuGetFolder←⊃GetNuGetDependencyFolders cfg | ||
nuGetFolder←{~'='∊2⊃⎕NPARTS ⍵:⍵ ⋄ ⊃{⍺,{⍵↑⍨¯1+⍵⍳'='}⍵}/⎕NPARTS ⍵}nuGetFolder | ||
:AndIf ⎕NEXISTS projectFolder,'/',nuGetFolder | ||
:AndIf 0<≢F.ListFiles projectFolder,'/',nuGetFolder,'/*.csproj' | ||
r←↑NuGet.Packages projectFolder,'/',nuGetFolder | ||
:EndIf |
This file was deleted.
Oops, something went wrong.
This file contains 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 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,24 @@ | ||
r←ListTatinDependencies projectFolder;cfgFilename;cfg;buildFilenames;buildLists;b;tatinFolders;buildFolders | ||
⍝ `y` must point to a project, either as alias ([]) or as a projectFolder. | ||
⍝ The actualt Tatin dependency folders are established from the project config file. | ||
r←0 5⍴'' | ||
:If IsAlias projectFolder | ||
projectFolder←GetFolderFromAlias2 projectFolder | ||
:EndIf | ||
cfgFilename←projectFolder,'/cider.config' | ||
'No Cider config file found'Assert F.Exists cfgFilename | ||
cfg←ReadProjectConfigFile cfgFilename | ||
tatinFolders←GetTatinDependencyFolders cfg | ||
:If 0<≢tatinFolders | ||
tatinFolders←{⍵↑⍨¯1+⍵⍳'='}¨tatinFolders | ||
buildFolders←(⊂projectFolder,'/'),¨tatinFolders | ||
buildFilenames←buildFolders,¨⊂'/apl-buildlist.json' | ||
b←F.Exists¨buildFilenames | ||
:AndIf 0<≢buildFilenames←b/buildFilenames | ||
'"dependencies" and "dependencies_dev" do not point to existing folders'Assert∨/b | ||
buildLists←{⎕JSON⍠('Dialect' 'JSON5')⊣⊃F.NGET ⍵}¨buildFilenames | ||
r←⍉∘↑¨(⊂¨' ',¨¨buildLists.packageID),¨buildLists.(principal url) | ||
r←(⊂¨b/tatinFolders,¨'/'),¨r | ||
r←{⍵,'? '[1+'https://tatin.dev/'∘≡¨⍵[;4]]}¨r | ||
r←⊃⍪/r | ||
:EndIf |
Oops, something went wrong.