Skip to content

Commit 92a13ce

Browse files
committed
Absence of Git vars is now properly reported
1 parent f9bd751 commit 92a13ce

File tree

3 files changed

+68
-54
lines changed

3 files changed

+68
-54
lines changed

APLSource/Cider/Cider.dyalog

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99

1010
rVersion;fully
1111
:Access Public Shared
12-
r'0.31.0-beta-5+410'
12+
r'0.31.1+410'
13+
* 0.31.1 ⋄ 2023-08-05
14+
* The function `GetCiderGlobalConfigHomeFolder` crashed when Cider was not properly installed
15+
* The absence of APLGit2 is now reported by OpenProject in case the project is managed by Git
16+
* Version 0.30.0 wrongly pretended to be a beta release when it wasn't
1317
* 0.31.0 ⋄ 2023-08-04
1418
* Step added to `OpenProject`: checks for a non-empty variable `ToDo` in the root of the project now
1519
* When Cider is asked for "Make" it checks for a variable `ToDo` now and reports its findings
@@ -556,6 +560,8 @@
556560
dmx⎕DMX
557561
:If 127=dmx.EN
558562
p'The project appears to be managed by Git but Git is not installed?!'
563+
:ElseIf 128=dmx.EN
564+
p'The project appears to be managed by Git but user.email and/or user.name are not defined'
559565
:ElseIf 0<dmx.Message
560566
'The Git status of the project could not be determined due to an error:'
561567
dmx.Message,'; rc=',dmx.EN
@@ -575,6 +581,8 @@
575581
p'The project appears to be managed by Git but the user command ]APLGit2 and'
576582
p'it''s API are missing, therefore no information can be provided regarding Git'
577583
:EndIf
584+
:Else
585+
p'The project appears to be managed by Git, but the package "APLGit2" is not installed...'
578586
:EndIf
579587
:EndIf
580588
@@ -1169,8 +1177,10 @@
11691177
:If 'Win'3##.APLTreeUtils2.GetOperatingSystem
11701178
:AndIf ~⎕NEXISTS folder,'config.json'
11711179
oldFolder(2 ⎕NQ #'GetEnvironment' 'APPDATA'),'/.cider/'
1172-
resfolder{(⎕NMOVE('IfExists' 'Skip')##.FilesAndDirs.ExecNfunction)}¨##.FilesAndDirs.ListFiles oldFolder
1173-
##.FilesAndDirs.RmDir oldFolder
1180+
:If ⎕NEXISTS oldFolder
1181+
resfolder{(⎕NMOVE('IfExists' 'Skip')##.FilesAndDirs.ExecNfunction)}¨##.FilesAndDirs.ListFiles oldFolder
1182+
##.FilesAndDirs.RmDir oldFolder
1183+
:EndIf
11741184
:EndIf
11751185
11761186

APLSource/Cider_uc.dyalog

Lines changed: 54 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
:Class Cider_UC
1+
:Class Cider_UC
22
User Command class for the project manager "Cider"
33
Kai Jaeger
4-
2023-08-02
4+
2023-08-05
55

66

77

@@ -231,8 +231,9 @@
231231

232232
rListAliases Args
233233
:If Args.edit
234-
EditAliasFile
235-
rProcessAliases 0 0 0
234+
:If 0=rEditAliasFile
235+
rProcessAliases 0 0 0
236+
:EndIf
236237
:Else
237238
rProcessAliases Args.(prune edit quiet)
238239
:EndIf
@@ -852,60 +853,63 @@
852853
853854

854855
{r}EditAliasFile dummy;filename;data_;Local;aliases;b;report;buff;b2;b3;flag;b4;b5;aliases_;b6
855-
r
856+
r''
856857
filenameP.GetCiderAliasFilename
857858
:If ~⎕NEXISTS filename
858859
3 ⎕MKDIR 1⎕NPARTS filename
859860
('')⎕NPUT filename
860861
:EndIf
861862
aliases_P.GetAliasFileContent
862-
aliasesaliases_
863-
aliases_¨{,'=',}/¨aliases_
864-
:Repeat
865-
⎕ED'aliases'
866-
aliases{'':¯1+'' }¨aliases Cider might inject comments to highlight problems, see below.
867-
aliases(aliases.¨' ')aliases
868-
aliases{b' '= /~(\b)(\b)' '}¨aliases
869-
aliases{' '()}¨aliases
870-
aliases¨{,'=',}/¨aliases
871-
flag0
872-
:If aliasesaliases_
873-
aliases_/({¨¨'='}aliases_){¨¨'='}aliases Get rid of deleted ones
874-
report(aliases)''
875-
:If /b~1=aliases+.=¨'='
876-
(b/report)' ⍝ Does not carry exactly one "="'
877-
:EndIf
878-
buff{'='()}¨(~b)/aliases
879-
:If /b2~{/⎕A,(⎕C ⎕A),⎕D,'-'}¨buff[;1]
880-
b3(~b)\b2
881-
(b3/report){'':,'; ', ,'',}'An alias must consist of nothing but A-Z, a-z, 0-9 and a hyphen'
882-
:EndIf
883-
:If /b2~⎕NEXISTS buff[;2]
884-
b3(~b)\b2
885-
(b3/report){'':,'; ', ,'',}'Folder does not exist'
886-
:EndIf
887-
:If /b4(~b2)\~⎕NEXISTS(~b2)/buff[;2],¨'/cider.config'
888-
b5(~b)\b4
889-
(b5/report){'':,'; ', ,'',}'Folder does not contain a Cider config file'
890-
:EndIf
891-
:If {()>}buff{'='}¨aliases
892-
b6~{()=}buff
893-
(b6/report)'⍝ Path has already an alias'
894-
:EndIf
895-
:If 0=report
896-
flag1
863+
:If 0<aliasesaliases_
864+
aliases_¨{,'=',}/¨aliases_
865+
:Repeat
866+
⎕ED'aliases'
867+
aliases{'':¯1+'' }¨aliases Cider might inject comments to highlight problems, see below.
868+
aliases(aliases.¨' ')aliases
869+
aliases{b' '= /~(\b)(\b)' '}¨aliases
870+
aliases{' '()}¨aliases
871+
aliases¨{,'=',}/¨aliases
872+
flag0
873+
:If aliasesaliases_
874+
aliases_/({¨¨'='}aliases_){¨¨'='}aliases Get rid of deleted ones
875+
report(aliases)''
876+
:If /b~1=aliases+.=¨'='
877+
(b/report)' ⍝ Does not carry exactly one "="'
878+
:EndIf
879+
buff{'='()}¨(~b)/aliases
880+
:If /b2~{/⎕A,(⎕C ⎕A),⎕D,'-'}¨buff[;1]
881+
b3(~b)\b2
882+
(b3/report){'':,'; ', ,'',}'An alias must consist of nothing but A-Z, a-z, 0-9 and a hyphen'
883+
:EndIf
884+
:If /b2~⎕NEXISTS buff[;2]
885+
b3(~b)\b2
886+
(b3/report){'':,'; ', ,'',}'Folder does not exist'
887+
:EndIf
888+
:If /b4(~b2)\~⎕NEXISTS(~b2)/buff[;2],¨'/cider.config'
889+
b5(~b)\b4
890+
(b5/report){'':,'; ', ,'',}'Folder does not contain a Cider config file'
891+
:EndIf
892+
:If {()>}buff{'='}¨aliases
893+
b6~{()=}buff
894+
(b6/report)'⍝ Path has already an alias'
895+
:EndIf
896+
:If 0=report
897+
flag1
898+
:Else
899+
aliases(1+/¨aliases)¨aliases
900+
aliasesaliases{0=: ,'',}¨report
901+
:EndIf
902+
:If ~flag
903+
aliases{'='()}¨aliases
904+
:EndIf
897905
:Else
898-
aliases(1+/¨aliases)¨aliases
899-
aliasesaliases{0=: ,'',}¨report
900-
:EndIf
901-
:If ~flag
902-
aliases{'='()}¨aliases
906+
flag1
903907
:EndIf
904-
:Else
905-
flag1
906-
:EndIf
907-
:Until flag
908-
(aliases)⎕NPUT filename 1
908+
:Until flag
909+
(aliases)⎕NPUT filename 1
910+
:Else
911+
r'There are no aliases defined in ',filename
912+
:EndIf
909913
910914

911915
YesOrNo{ ⎕SE.Cider.##.CommTools.YesOrNo }

apl-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
source: "APLSource/Cider/",
2020
tags: "project-management",
2121
userCommandScript: "APLSource/Cider_UC.dyalog",
22-
version: "0.31.0+485",
22+
version: "0.31.1+486",
2323
}

0 commit comments

Comments
 (0)