Skip to content

Commit

Permalink
Fix for Link options
Browse files Browse the repository at this point in the history
  • Loading branch information
aplteam committed Sep 25, 2023
1 parent 8571a14 commit a7b48df
Show file tree
Hide file tree
Showing 22 changed files with 87 additions and 61 deletions.
31 changes: 21 additions & 10 deletions APLSource/Admin/GetProgramFilesFolder.aplf
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
rGetProgramFilesFolder add;version;aplVersion;OS
Returns standard path for Dyalog's version-specific folder in %USERPROFILE%\Documents\.\\
r{current}GetProgramFilesFolder postFix;version;aplVersion;OS
Returns standard path for Dyalog's version-specific program files folder.\\
Works on all platforms but returns different results.\\
Under Windows typically:\\
`C:\Users\<⎕AN>\Documents\Dyalog APL[-64] 19.0 Unicode Files' ←→ GetProgramFilesFolder ''
OS3# ⎕WG'APLVersion'
add{(((~'/\')0)/'/'),}add
`C:\Users\<⎕AN>\Documents\Dyalog APL[-64] 19.0 Unicode Files' ←→ GetMyUCMDsFolder
⍺ is optional and defaults to 0, meaning the version-agnostic folder is returned.
If ⍺←1, the folder associated with the currently running version of Dyalog is returned.
current{0<⎕NC : 0}'current'
OS3# ⎕WG'APLVersion'
postFix{(((~'/\')0)/'/'),}postFix
aplVersion# ⎕WG'APLVersion'
:If OS'Win'
version((/'-64'1aplVersion)/'-64'),' ',({/2>+\='.'}2aplVersion),' ',(80=⎕DR' ')/'Unicode'
r(2 ⎕NQ #'GetEnvironment' 'USERPROFILE'),'\Documents\Dyalog APL',version,' Files',add
:If current
:If OS'Win'
version((/'-64'1aplVersion)/'-64'),' ',({/2>+\='.'}2aplVersion),' ',(80=⎕DR' ')/'Unicode'
r(2 ⎕NQ #'GetEnvironment' 'USERPROFILE'),'\Documents\Dyalog APL',version,' Files',postFix
:Else
version({'.'~/2>+\='.'}2aplVersion),((80=⎕DR' ')/'U'),((1+/'-64'1aplVersion)'32' '64')
r(⎕SH'echo $HOME'),'/dyalog.',version,'.files',postFix
:EndIf
:Else
version({'.'~/2>+\='.'}2aplVersion),((80=⎕DR' ')/'U'),((1+/'-64'1aplVersion)'32' '64')
r(⎕SH'echo $HOME'),'/dyalog.',version,'.files',add
:If OS'Win'
r(2 ⎕NQ #'GetEnvironment' 'USERPROFILE'),'\Documents\Dyalog APL Files',postFix
:Else
r(⎕SH'echo $HOME'),'/dyalog.files',postFix
:EndIf
:EndIf
2 changes: 1 addition & 1 deletion APLSource/Cider/AddNuGetDependencies.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
:If 0<nuGetFolder
nuGetFolderFilesAndDirs.EnforceSlash nuGetFolder .NET requirement
{}⎕MKDIR(~⎕NEXISTS nuGetFolder)nuGetFolder
'Unable to locate NuGet API'Assert 0NuGetFindNuGetAPI
'Unable to locate NuGet API'Assert 0<NuGetFindNuGetAPI
msgNuGet.Setup nuGetFolder
msg Assert~/'error:'⎕C msg
list''
Expand Down
43 changes: 28 additions & 15 deletions APLSource/Cider/ExtractLinkOptions.aplf
Original file line number Diff line number Diff line change
@@ -1,45 +1,58 @@
optionsExtractLinkOptions config;C;overWrite
rExtractLinkOptions config;C;options
This is slowly going to disappear because Link 4.0 will come with its own set of features
for setting Link parameters.
options⎕SE.Link.U.DefaultOpts ⎕NS''
r⎕NS''
Cconfig.LINK
overWrite{0=: }
:If 0<C.⎕NC'arrays'
options.arrays(overWrite)C.arrays
:AndIf options.arraysC.arrays
r.arraysC.arrays
:EndIf
:If 0<C.⎕NC'beforeRead'
options.beforeRead(overWrite)C.beforeRead
:AndIf options.beforeReadC.beforeRead
r.beforeReadC.beforeRead
:EndIf
:If 0<C.⎕NC'beforeWrite'
options.beforeWrite(overWrite)C.beforeWrite
:AndIf options.beforeWriteC.beforeWrite
r.beforeWriteC.beforeWrite
:EndIf
:If 0<C.⎕NC'caseCode'
options.caseCode(overWrite)C.caseCode
:AndIf options.caseCodeC.caseCode
r.caseCodeC.caseCode
:EndIf
:If 0<C.⎕NC'codeExtensions'
options.codeExtensions(overWrite)C.codeExtensions
:AndIf options.codeExtensionsC.codeExtensions
r.codeExtensionsC.codeExtensions
:EndIf
:If 0<C.⎕NC'fastLoad'
options.fastLoad(overWrite)C.fastLoad
:AndIf options.fastLoadC.fastLoad
r.fastLoadC.fastLoad
:EndIf
:If 0<C.⎕NC'flatten'
options.flatten(overWrite)C.flatten
:AndIf options.flattenC.flatten
r.flattenC.flatten
:EndIf
:If 0<C.⎕NC'forceExtensions'
options.forceExtensions(overWrite)C.forceExtensions
:AndIf options.forceExtensionsC.forceExtensions
r.forceExtensionsC.forceExtensions
:EndIf
:If 0<C.⎕NC'forceFilenames'
options.forceFilenames(overWrite)C.forceFilenames
:AndIf options.forceFilenamesC.forceFilenames
r.forceFilenamesC.forceFilenames
:EndIf
:If 0<C.⎕NC'getFilename'
options.getFilename(overWrite)C.getFilename
:AndIf options.getFilenameC.getFilename
r.getFilenameC.getFilename
:EndIf
:If 0<C.⎕NC'typeExtensions'
options.typeExtensions(overWrite)C.typeExtensions
:AndIf options.typeExtensionsC.typeExtensions
r.typeExtensionsC.typeExtensions
:EndIf
:If 0<C.⎕NC'watch'
options.watchC.watch
:AndIf options.watchC.watch
r.watchC.watch
:EndIf
:If 0<C.⎕NC'fastLoad'
options.fastLoadconfig.LINK.fastLoad
:AndIf options.fastLoadC.fastLoad
r.fastLoadconfig.LINK.fastLoad
:EndIf
15 changes: 8 additions & 7 deletions APLSource/Cider/FindNuGetAPI.aplf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
NuGetFindNuGetAPI dummy
Find a NuGet ns

NuGet{0,(9=⎕NC )/} '#.NuGet' '⎕SE.Dyalog.Nuget' '⎕SE.NuGet'
:If 0NuGet
NuGetNuGet
:EndIf
refFindNuGetAPI dummy;bool;list
Tries to find a NuGet ns somewhere, and returns a ref to the first hit, otherwise ''
ref''
list'#.NuGet' '⎕SE.Dyalog.Nuget' '⎕SE.NuGet'
bool9=⎕NC list
:If /bool
refbool/list
:EndIf
23 changes: 12 additions & 11 deletions APLSource/Cider/ListNuGetDependencies.aplf
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
rListNuGetDependencies projectFolder;NuGet;cfg;nuGetFolder
r0 2''
NuGetFindNuGetAPI''
:If IsAlias projectFolder
projectFolderGetFolderFromAlias2 projectFolder
:EndIf
'No Cider config file found'Assert F.Exists projectFolder,'/cider.config'
cfgReadProjectConfigFile projectFolder
:If 0<nuGetFolderGetNuGetDependencyFolders cfg
nuGetFolder{~'='2⎕NPARTS : {,{¯1+'='}}/⎕NPARTS }nuGetFolder
:AndIf ⎕NEXISTS projectFolder,'/',nuGetFolder
:AndIf 0<F.ListFiles projectFolder,'/',nuGetFolder,'/*.csproj'
rNuGet.Packages projectFolder,'/',nuGetFolder
:If 0<NuGetFindNuGetAPI''
:If IsAlias projectFolder
projectFolderGetFolderFromAlias2 projectFolder
:EndIf
'No Cider config file found'Assert F.Exists projectFolder,'/cider.config'
cfgReadProjectConfigFile projectFolder
:If 0<nuGetFolderGetNuGetDependencyFolders cfg
nuGetFolder{~'='2⎕NPARTS : {,{¯1+'='}}/⎕NPARTS }nuGetFolder
:AndIf ⎕NEXISTS projectFolder,'/',nuGetFolder
:AndIf 0<F.ListFiles projectFolder,'/',nuGetFolder,'/*.csproj'
rNuGet.Packages projectFolder,'/',nuGetFolder
:EndIf
:EndIf
2 changes: 1 addition & 1 deletion APLSource/Cider/LoadNugetDependencies.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
:If F.IsDir nuGetFolder
:AndIf 0<list2F.ListFiles nuGetFolder,'/*.csproj'
pverbose batch{ PrintToSession }
NuGetFindNuGetAPI
:AndIf 0<NuGetFindNuGetAPI
:If 2=⎕NC'ns'
nsns
:EndIf
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Cider/Version.aplf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rVersion
See als History
r'0.36.0+579'
r'0.36.0+581'
2 changes: 1 addition & 1 deletion TestData/Foo2-Project/packages/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-APLTreeUtils2-1.2.0", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-APLTreeUtils2-1.2.0", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_Open_020/packages/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-Tester2-3.1.3", "aplteam-IniFiles-5.0.2", "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, 0, 0, ], url: [ "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", ],}
{ packageID: [ "aplteam-Tester2-3.1.3", "aplteam-IniFiles-5.0.2", "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, 0, 0, ], url: [ "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_Open_021/packages/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-Tester2-3.2.1", "aplteam-IniFiles-5.0.2", "aplteam-APLTreeUtils2-1.1.3", ], principal: [ 1, 0, 0, ], url: [ "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", ],}
{ packageID: [ "aplteam-Tester2-3.2.1", "aplteam-IniFiles-5.0.2", "aplteam-APLTreeUtils2-1.1.3", ], principal: [ 1, 0, 0, ], url: [ "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_Open_021/packages_dev/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_Open_052/packages/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_Open_052/packages_dev/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_Tatin_003/packages_dev/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_UC_020/packages/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_UC_020/packages_dev/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_UC_021/packages/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_UC_021/packages_dev/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_UC_022/packages/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-APLTreeUtils2-1.1.1", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Test_UC_022/packages_dev/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
{ packageID: [ "aplteam-CodeCoverage-0.7.3", ], principal: [ 1, ], url: [ "https://tatin.dev/", ],}
Expand Down
2 changes: 1 addition & 1 deletion apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
source: "APLSource/Cider/",
tags: "project-management",
userCommandScript: "APLSource/Cider_UC.dyalog",
version: "0.36.0+579",
version: "0.36.0+581",
}
2 changes: 1 addition & 1 deletion tatin-packages_dev/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ packageID: [ "aplteam-Tester2-3.5.0", "aplteam-MakeHelpers-0.10.1", "aplteam-FilesAndDirs-5.5.0", "aplteam-CommTools-1.7.0", "aplteam-CodeCoverage-0.10.3", "aplteam-APLTreeUtils2-1.2.0", "aplteam-ZipArchive-1.1.0", "aplteam-OS-3.1.1", "aplteam-MarkAPL-11.1.0", "aplteam-IniFiles-5.0.3", "aplteam-DotNetZip-2.0.2", ], principal: [ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, ], url: [ "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", ],}
{ packageID: [ "aplteam-Tester2-3.5.0", "aplteam-MakeHelpers-0.10.1", "aplteam-FilesAndDirs-5.5.0", "aplteam-CommTools-1.7.0", "aplteam-CodeCoverage-0.10.3", "aplteam-APLTreeUtils2-1.2.0", "aplteam-ZipArchive-1.1.0", "aplteam-OS-3.1.1", "aplteam-MarkAPL-11.1.0", "aplteam-IniFiles-5.0.3", "aplteam-DotNetZip-2.0.2", ], principal: [ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, ], url: [ "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", "https://tatin.dev/", ],}
Expand Down

0 comments on commit a7b48df

Please sign in to comment.