Skip to content

Commit

Permalink
Packages updated & Several bug fixes & References report improved
Browse files Browse the repository at this point in the history
  • Loading branch information
aplteam committed Sep 12, 2022
1 parent 5003593 commit d11c02a
Show file tree
Hide file tree
Showing 1,046 changed files with 78,356 additions and 184 deletions.
11 changes: 4 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# Auto detect text files and perform LF normalization
# Auto detect text files
* text=auto

*.aplf linguist-language=apl
*.aplo linguist-language=apl
*.aplc linguist-language=apl
*.apln linguist-language=apl
*.apli linguist-language=apl
*.dws linguist-language=apl
*.apl? linguist-language=apl
*.dyapp linguist-language=apl
*.dyalog linguist-language=apl
*.dws linguist-language=apl

Dist/ linguist-vendored=true
CSS/ linguist-vendored=true
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.acre/
aplcore
Dist/
change_history/
/Dist/
CONTINUE.dws
conga.crash
35 changes: 35 additions & 0 deletions APLSource/Admin/Make.aplf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Make flag;targetPath;home;M;name;setupExe;myUCMDsFolder;C
Version 7.0.0 ⋄ 2022-08-30
⎕IO1 ⎕ML1
:If flag
home##.CiderConfig.HOME,'/'
targetPathhome,'Dist/'
{:.}' '10⎕FX'r←M' 'r←⎕SE.MakeHelpers' avoids creating a link in # that point to ⎕SE
C##.CiderConfig
myUCMDsFolderM.GetMyUCMDsFolder'\'
name'Fire'
⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
M.RecreateFolder targetPath
M.IncreaseBuildID'#.',name,'.',name,'.Version'
M.CopyBetter(myUCMDsFolder,'Fire/Fire_uc.dyalog')(home,C.CIDER.source,'/Fire_uc.dyalog')'MyUCMDs/'(C.CIDER.source,'/')
{}⎕SE.Cider.CloseProject'' Precaution
⎕WSIDtargetPath,name,'.dws'
0 ⎕SAVE ⎕WSID
#.⎕EX ⎕NL16
⎕LX'#.',name,'.Run 0'
'#.Fire.Fire'#.⎕CY ⎕WSID
0 ⎕SAVE ⎕WSID
'./packages'M.CopyTo targetPath
M.ConvertMarkdownToHtml5(home,'Docs/')(targetPath,'html/')
##.FilesAndDirs.DeleteFile targetPath,'/html/readme.html'
(home,##.CiderConfig.CIDER.source,'/',name,'_UC.dyalog')M.CopyTo targetPath
(home,'LICENSE')M.CopyTo targetPath
(home,'Fire.ico')M.CopyTo targetPath
setupExe##.TestCases.Inno.Run name
M.RemoveStuffButSetupExe targetPath
:If 1 M.YesOrNo'Would you like to execute "',setupExe,'" ?'
⎕CMD setupExe
:EndIf
'Clearing the workspace...'
⎕CLEAR
:EndIf
2 changes: 1 addition & 1 deletion APLSource/Fire/GUI/About.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Show the "About" information
msg'Fire version ',{,' - ',}/1##.Version
msg,''
msg,'Written by Kai Jaeger ⋄ APL Software Ltd'
msg,'Written by Kai Jaeger'
msg,''
msg,'https://github.com/aplteam/Fire'
##.Question.ShowMsg msg
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire/GUI/NamespaceList/Run.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
CreateGui
⎕NQ n.TheList'GotFocus'
⎕DQ n.TheForm
n.TheForm.Close
:Trap 6 n.TheForm.Close :EndTrap The user might have destroyed it already
Done
1 change: 1 addition & 0 deletions APLSource/Fire/GUI/OnConfigure.aplf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OnConfigure{rf0r r[5]1 r[4]0 r}
3 changes: 2 additions & 1 deletion APLSource/Fire/GUI/OnReportReferences.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
parms.okCaption'#'
parms.caption2'[]SE'
(0=answerparms ##.Question.ThreeButton'Where would you like to start?'):
n.RefToReferencesReport##.ReportReferences.Run(answer-1)# ⎕SE
ignoreTatin##.Question.YesOrNo'Exclude Tatin packages ([#|⎕SE)._tatin) ?'
n.RefToReferencesReportignoreTatin ##.ReportReferences.Run(answer-1)# ⎕SE
}
78 changes: 21 additions & 57 deletions APLSource/Fire/History.apla
Original file line number Diff line number Diff line change
@@ -1,59 +1,23 @@
(
'⍝ Contains information regarding the last release. A full history is available on GitHub. (This line is ignored)'
''
'* 9.3.0 from 2021-12-23'
' * Because if the danger involved Fire "Replace" refuses to act in case there are threads running.'
' * Bug fixes: '
' * In case a function needs to be deleted as a result of "Delete lines with hits" (when no code it left)'
' Link was not informed.'
' * In case of hits in `#` the very first one was not reported.'
'* 9.2.1 from 2021-10-24'
' * "Case sensitive" in "Search QNL" did not work.'
'* 9.2.0 from 2021-10-03'
' * Fire now cooperates with Link but needs at least version 3.0 of Link for that to work'
'* 9.1.3 from 2021-04-30'
' * Fire does not leave behind orphaned refs anymore. Important because that may cause a performance penalty '
' * Attempt to change something in a scripted namespaces that is embedded in a scripted namespaces causes a '
' "Not supported by design" warning now.'
'* 9.1.2 from 2021-04-18'
' * Bug fix: ReportHits.MarkUpAllHits was buggy'
'* 9.1.1 from 2021-04-17'
' * Replace with one-by-one did not work'
'* 9.1.0 from 2021-04-07'
' * New parameter "StartSearchIn" introduced for searching ⎕NL (CreateParmsFor_QNL_Search) that defaults to "#" but'
' can also be "⎕SE".'
' * Bug fixes'
' * In case "searchFor" was specified as a parameter via the left argument of `SearchQNL` this was overwritten'
' by the right argument, even in case this was empty.'
' * Fire 9 did not run under Dyalog 18.1'
'* 9.0.1'
' * There was a problem with the Fire icon. It hit only on PCs were Fire has never been installed before.'
'* 9.0.0'
' * Breaking changes: '
' * Requires at least Dyalog 18.0 Unicode.'
' * Requires the Tatin package manager to be available.'
' * New option "Ignore references" defaults to 1.'
' * New option "Ignore Tatin packages" defaults to 1.'
' * Two new functions added to the API: `SearchQNL` and `CreateParmsFor_QNL_Search`.'
' * Messages in the status bar are now explicitly mentioning whether the hit list was searched.'
' * When a search of the current hit list yields no results the "Search hit list" button is un-ticked and the'
' "Search in" field is made available.'
' * The API is now (also) available from `⎕SE.Fire`'
' * Bug fixes:'
' * Attempts to remove variables from the hit report failed.'
' * In the hit list, moving the selection with the keyboard did not update the right pane accordingly.'
' * Ctrl+A in the hit report did not select all items.'
' * Removing an item from the hit list did not remove it from the HTML.'
' * "Remove from hit report" could result in a WS FULL in case of a very large hit list.'
' * When in the "Start looking here" field a space was entered Fire got confused; it should not be possible to '
' enter a space since it makes no sense in this field.'
' * It was possible to enter a dot in the "Start looking here" field even if there weren''t any sub-namespaces'
' available. That should be prevented.'
' * The replace preview failed to show anything sensible when the replace string refered to groups.'
' * When after a search for an RegEx a one-by-one replace operation was triggered Fire might produce a VALUE ERRROR.'
' * In the "Replace" dialog the "Delete lines" options should not be available (active) when it is a RegEx search.'
' * The `∆List` function created by `Fire.API.CreateSearchParms` was buggy.'
' * Internal change: all calls to acre via ⎕SE.UCMDS have now been replaced by calls to acre''s API.'
'\\\\'
'For information regarding older version see <https://github.com/aplteam/Fire/releases>'
'⍝ Contains information regarding the last release. A full history is available on GitHub. (This line is ignored)'
''
'* 9.4.0 from 2022-09-11'
' * The "References" report now offers to ignore Tatin packages '
' * Bug fixes '
' * Searching for a RegEx and then replacing it by a multi-line expression let to a wrong report, though the'
' replace operation would have worked just fine.'
' * When the special syntax ]Fire . was used while a function was on the stack that came from a class instance'
' then the setting of "Start looking here" was both wrong and invalid'
' * Under certain (and rare) circumstances closing the "Replace" dialog box resulted in a VALUE ERROR'
' * Resizing the "Remove all objects from namespace... from list" dialog box resulted in a stream of VALUE ERROR '
' on a missing `OnConfiguration` handler'
' * In the "References" report the message regarding anomalies always mentioned a wrong line number'
'* 9.3.0 from 2021-12-23'
' * Because if the danger involved Fire "Replace" refuses to act in case there are threads running.'
' * Bug fixes: '
' * In case a function needs to be deleted as a result of "Delete lines with hits" (when no code it left)'
' Link was not informed.'
' * In case of hits in `#` the very first one was not reported.'
'\\\\'
'For information regarding older version see <https://github.com/aplteam/Fire/releases>'
)
17 changes: 10 additions & 7 deletions APLSource/Fire/OneByOneComparison/CompileRegExReport.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,19 @@
htmlns.ss ⎕R fnsns.options##.A.DLB oldCode
html'<div class="line"><code>',html,'</code></div>'
:Else
ns.i0
ns.linesns.lines
ns.oldCodeoldCode[ns.lines]
ns.rs('<br>')@(ns.rs=⎕UCS 13)ns.rs In case the replace array spans more than line line
ns.newCodens.ss ⎕R ns.rsns.optionsns.oldCode
fnsns{
ns
idns.ins.IDs
ns.i+1
newns.ss ⎕R ns.rsns.options.Match
'<span class="diff-old" id="n',id,'-old">',.Match,'</span><span class="diff-new" id="n',id,'-new">',new,'</span>'
i
idins.IDs
new'<span class="diff-old" id="n',id,'-old">',(ins.oldCode),'</span><span class="diff-new" id="n',id,'-new">',(ins.newCode),'</span>'
new'<div class="line"><span class="lineno">[',(ins.lines),']</span><code>',(ins.newCode),'</code></div>'
new
}
htmlns.ss ⎕R fnsns.options##.A.DLB oldCode[ns.lines]
html(¨lineNumbers){'<div class="line"><span class="lineno">[',,']</span><code>',,'</code></div>'}¨html
htmlfns¨ns.lines
:EndIf
n2.∆HtmlFilename WriteFile html
n2.∆HtmlFilename WriteFile BottomOfDoc
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire/OneByOneComparison/CreateGUI.aplf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
nparms CreateGUI(name i noOfObjs);;rf;b;wasTicked;noOf;ref
n⎕NS''
'Form'
,'Caption'(##.AddPidToCaption'Fire - Replace one by one')
,'Caption'(##.AddPidToCaption'Fire - Replace one by one: ',name)
,'Coord' 'Pixel'
,'Icon'##.GUI.n.TheIcon
,'Size'parms.Size
Expand Down
6 changes: 4 additions & 2 deletions APLSource/Fire/OneByOneComparison/Replace.aplf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
newCodeReplace G;ns;fns;hits;bool;oldCode
newCodeReplace G;ns;fns;hits;bool;oldCode;buff
:If ##.G.SearchIsRegEx
ns⎕NS''
ns.options##.Replace.GetRegExOptions G.OldCode ##.G
Expand All @@ -14,7 +14,9 @@
~ns.ins.these:.Match No change
ns.ss ⎕R ns.rsns.options.Match
}
newCode[ns.lines]ns.ss ⎕R fnsns.optionsnewCode[ns.lines]
buffns(fns{.ss ⎕R ⍺⍺.options})¨newCode[ns.lines]
∘∘∘
newCode[ns.lines]buff
:Else
:If G.DeleteFlag
newCodeG.OldCode[(G.OldCode)~G.LineNumbers[G.These]]
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire/Question/CreateDefaultParms.aplf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rCreateDefaultParms
Creates a set od default parms
Creates a set of default parms
r⎕NS''
r.addToCaption''
r.defaultBtn'OK' Which button gets the focus?
Expand Down
9 changes: 5 additions & 4 deletions APLSource/Fire/Question/CreateGUI.aplf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ffcs CreateGUI caption;;i;flag;this;rf;btnWidth;LinkFnt;noOf
'Form'
:If 0cs.addToCaption
:If 0=cs.addToCaption
,'Caption'(##.AddPidToCaption'Fire')
:Else
,'Caption'(##.AddPidToCaption'Fire : ',cs.addToCaption)
Expand Down Expand Up @@ -53,7 +53,7 @@
'ok'ff.⎕WC
ff.ok.onSelect'OnOkay'

:If ~ff.ok.Cancel0cs.caption2
:If ~ff.ok.Cancel0=cs.caption2
'Button'
,'Caption'cs.caption2
,'Posn'((ff.Size[0]-35),10+1+ff.ok.(Posn Size))
Expand All @@ -66,7 +66,7 @@
ff.btn2.onSelect'OnBtn2'
:EndIf

:If ~ff.ok.Cancel0cs.cancelCaption
:If ~ff.ok.Cancel0=cs.cancelCaption
'Button'
,'Caption'cs.cancelCaption
,'Size'( btnWidth)
Expand All @@ -75,7 +75,7 @@
:AndIf cs.escape
,'Cancel' 1
:EndIf
:If 0cs.caption2
:If 0=cs.caption2
,'Posn'((ff.Size[0]-35),10+1+ff.ok.(Posn Size))
,'Attach'(4'Bottom' 'Right')
:Else
Expand All @@ -99,6 +99,7 @@
'Warning_Again'ff.⎕WC
ff.Warning_Again.Posn(ff.ok.Posn[0]-10+ff.Warning_Again.Size[0]),10
:EndIf

:If 2=+/(0=ff.⎕NC'btn2')(0=ff.⎕NC'cancel')
ff.ok.Posn[1]0.5×ff.Size[1]-ff.ok.Size[1]
:EndIf
Expand Down
9 changes: 0 additions & 9 deletions APLSource/Fire/Replace/CreateHiddenBtnsn.aplf

This file was deleted.

1 change: 1 addition & 0 deletions APLSource/Fire/Replace/CreateReplaceByEditField.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
:EndIf
msg'Enter here the string you want⌹to replace "Search for" with.'
msg,##.G.SearchIsRegEx/'⌹This will become the right argument⌹of the ⎕R operator.'
msg,'⌹Press F6 in order to copy "Search for" to "Replace by".'
,'Style' 'Multi'
,'VScroll' ¯1
,'WantsReturn' 0
Expand Down
1 change: 0 additions & 1 deletion APLSource/Fire/Replace/CreateReplaceReplaceBy.aplf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{n}CreateReplaceReplaceBy n;;height;msg
'Label'
∆,←⊂'Posn'((10+0⊃PosnPlusSize n.SearchIsRegEx),12)
,'Posn'((10+0PosnPlusSize n.SearchFor),12)
,'Caption' '&Replace by:'
,'Attach'(4'Top' 'Left')
Expand Down
15 changes: 13 additions & 2 deletions APLSource/Fire/ReportDiffs/CompileReport_.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,26 @@
noOf+/\{()()}/minLength¨old new
:If 0<noOf
Drop G.DeleteLineFlag noOf noOf
:ElseIf 1<G.ReplaceBy Multi-line replacement?
∘∘∘
data1{(1=): 1,/##.CR,¨}{A.DLB }¨(G.ReplaceBy)1New
data2←##.A.DLB{2=≡⍵:{0=≢⍵:⍵ ⋄ 0⊃⍵}⍵ ⋄ ⍵}Old ⍝TODO⍝
data2{(1=): 1,/##.CR,¨}{A.DLB }¨1Old
data11TAB,TAB,'p'Tag 1 MarkupDiff2 data2 data1 G.SearchFor G.ReplaceBy
data22TAB,TAB,'p'Tag 2 MarkupDiff2 data1 data2 G.ReplaceBy G.SearchFor
dataTAB,({(0=)(,0),:'' '<span class="lineno">[',(),']</span><br>'}lns),TAB,'div class="comp"'Tag data11,data22
WriteReport data,##.CR
noOf1
Drop G.DeleteLineFlag(G.ReplaceBy)noOf
:Else
data1{(1=): 1,/##.CR,¨}{A.DLB }¨1New
data1{(1=): 1,/##.CR,¨}{A.DLB }¨(G.ReplaceBy)1New
data2##.A.DLB{2=:{0=: 0} }Old
data11TAB,TAB,'p'Tag 1 MarkupDiff2 data2 data1 G.SearchFor G.ReplaceBy
data22TAB,TAB,'p'Tag 2 MarkupDiff2 data1 data2 G.ReplaceBy G.SearchFor
dataTAB,({(0=)(,0),:'' '<span class="lineno">[',(),']</span><br>'}lns),TAB,'div class="comp"'Tag data11,data22
WriteReport data,##.CR
noOf1
Drop G.DeleteLineFlag noOf 1
Drop G.DeleteLineFlag noOf noOf
:EndIf
:Until 0=New
:EndIf
Expand Down
13 changes: 9 additions & 4 deletions APLSource/Fire/ReportDiffs/MarkupDiff2.aplf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rtype MarkupDiff2(tx1a tx2a tx1b tx2b);b;l;equal;l1;l2;equal2
Everything that is different between tx1a and tx1b is marked up as <span class="diff">
tx1a & tx1b are lines of code
tx2a & tx2b are G.SearchFor & G.ReplaceBy or vice versa
tx1a & tx2a are lines of code
tx1b & tx2b are G.SearchFor & G.ReplaceBy or vice versa
r''
(tx1b tx2b){{1,/(⎕UCS 13),¨}(1<)}¨tx1b tx2b
(l1 l2)¨tx1b tx2b
Expand All @@ -10,11 +10,16 @@
:Else
equal2+/\=/{(/¨)¨}tx1b tx2b "searchFor" and "replaceBy" might by equal to some extent
:While (0tx2a)
equal+/\1↑↑↑=/{(/¨)¨}tx1a tx2a
equal←+/∧\1↑↑↑=/{(⌊/≢¨⍵)↑¨⍵}tx1a tx2a
equal+/\=/¨{(/¨)¨}tx1a tx2a
:If 0<equal
r,##.ReplaceSpecialChars equaltx1a
(tx1a tx2a)equal¨tx1a tx2a
:ElseIf 0=tx2b
:ElseIf 0=tx1a
r,'<span class="diff',(type),'">',(##.ReplaceSpecialChars tx2a),'</span>'
r,'<br>','<span class="diff',(type),'">',(##.ReplaceSpecialChars tx2b),'</span>'
:Return
:ElseIf 0=tx1b
r,'<span class="diff',(type),'">',(##.ReplaceSpecialChars equal2tx2b),'</span>'
:Else
r,'<span class="diff',(type),'">',(##.ReplaceSpecialChars equal2tx2b),'</span>'
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire/ReportDiffs/Tag.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'<h1>hello</h1>' ←→ 'h1' Tag 'hello'
'<h1 class="this">hello</h1>' ←→ 'h1 class=this' Tag 'hello'
'pre'
(0):''
(0=):''
tag' '~' ',
attr(tag)
'<',tag,attr,'>',,'</',tag,'>'
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire/ReportReferences/CreateGUI.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
,'Size'(100 100)
,'Attach'('Top' 'Left' 'Right' 'Bottom')
,'View' 'Report'
,'ColTitles'('No' 'A' 'Reference name' 'Pointing to' '[]NC')
,'ColTitles'('No' 'A' 'Reference name' '[]NC' 'Pointing to' '[]NC')
lv'LV'ref.⎕WC
lv.onKeyPress'OnKeyPress'

Expand Down
Loading

0 comments on commit d11c02a

Please sign in to comment.