Skip to content

Commit

Permalink
Two bug fixes plus restriction for Replace
Browse files Browse the repository at this point in the history
  • Loading branch information
aplteam committed Dec 23, 2021
1 parent 9b07089 commit 5003593
Show file tree
Hide file tree
Showing 39 changed files with 1,078 additions and 1,007 deletions.
2 changes: 2 additions & 0 deletions APLSource/Fire/GUI/CopyGuiToGlobal.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
n.SearchFor.SelItems[]0
_{0=: n.SearchFor.SelItems[##.G.LookForList]1}txt
0¨##.G.LookForList:.
122<⌈/⊃,/⎕UCS¨n.SearchFor.Items:. ⍝ ⍝TODO⍝ 122 is ⌈/⎕UCS ⎕A,⎕C ⎕A (<01956>

G.SearchFor2 might or might not be lowercase version of G.SearchFor depending
↓↓↓↓↓↓↓↓↓↓ on user preferences. That's why this must be done late.
##.G.SearchFor2##.IfLower ##.G.SearchFor
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire/GUI/SearchQNL/Search.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
r
printToSession{0<⎕NC : 1}'printToSession'
containerList(##.##.CompileNamespaceList parms.StartSearchIn 1)[;0]
list1,/GetNames¨containerList
list(,/GetNames¨containerList)~,'#'
:If parms.FullPath
list2list
:Else
Expand Down
6 changes: 6 additions & 0 deletions APLSource/Fire/History.apla
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
(
'⍝ 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'
Expand Down
3 changes: 1 addition & 2 deletions APLSource/Fire/Replace/QFX.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
r0
:If 0=code
:AndIf (ref.⎕NCname)3.1 3.2 4.1 4.2
ref.⎕EX name
:If 1=##.IsAnyAcreAround
:If 3=⎕NC'#.acre.Erase'
{}#.acre.Erase(ref),'.',name
Expand All @@ -15,7 +14,7 @@
. Huuh?! Acre is around and isn't?!
:EndIf
:EndIf
TODO⍝ Link: Add Link support here
{}⎕SE.Link.Expunge(ref),'.',name
:Else
∆Fix:
code{(⎕UCS 13)Split }((⎕UCS 13)code)code
Expand Down
6 changes: 6 additions & 0 deletions APLSource/Fire/Replace/Run.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
Result "rc" gets 1 for "carry on" and 0 if the user wants to cancel.
r
##.GUI.n.Form.Active←0 ⍝ I would love to do that but it stops the test cases from working!
:If 1<⎕TNUMS
⎕DL 0.5
:AndIf 1<⎕TNUMS
'Replace'##.Question.ShowMsg'"Replace" is incompatible with multiple threads running.'
:Return
:EndIf
hl##.GUI.n.HitList
NoOfReplacements0
hlRemoveUnknown hl
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire/Version.aplf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rVersion
See also `History`
r(1¯1⎕NPARTS⎕THIS)'9.2.1+207' '2020-10-24'
r(1¯1⎕NPARTS⎕THIS)'9.3.0+211' '2020-12-24'
43 changes: 43 additions & 0 deletions APLSource/TestCases/Test_ReplaceAndDelete_10.aplf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
RTest_ReplaceAndDelete_10(stopFlag batchFlag);n;n2;⎕TRAP;tempDir;parms;msg
Replace all code in a direct function with Link involved; function must be deleted.
⎕TRAP(999 'C' '. ⍝ Deliberate error')(0 'N')
RT._Failed

Preconditions
tempDirFilesAndDirs.GetTempSubDir⎕SI
#.⎕EX'TEMP' 'TEMP'#.⎕NS'' 'TEMP2'#.TEMP.⎕NS''
#.TEMP.TEMP2.myDfns2{42}
#.TEMP.myDfns{42}
parms⎕NS''
parms.watch'ns'
msgparms ⎕SE.Link.Create'#.TEMP2'tempDir
Assert'Linked: #.TEMP2 '{()}msg

1 #.Fire.Fire.Run 0
n#.Fire.Fire.GUI.n

n.SearchFor.Text'42'
n.StartSearchIn.Text'#.TEMP'

{}∆Select n.StartBtn
0.2 ∆Process n.Form
T.GoToTidyUp 2n.HitList.Items

{}∆Select n.ReplaceBtn
∆Process n.Form

n2#.Fire.Fire.Replace.n
n2.ReplaceBy.Text''
n2.DeleteLine.State1

{}∆Select n2.StartBtn
∆Process n.Form
T.GoToTidyUp 2#.Fire.Fire.Replace.NoOfReplacements
T.GoToTidyUp 0<#.TEMP.⎕nl 3
T.GoToTidyUp 0<#.TEMP.TEMP2.⎕nl 3
RT._OK

∆TidyUp:
CloseFire
{}⎕SE.Link.Break'#.TEMP'
⎕EX¨'#.TEMP' '#.TEMP2'
11 changes: 11 additions & 0 deletions Docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ Note that with version 9.0.0 Fire started using the concept of semantic versioni

In short this means that a bump of the major version number indicates a breaking change. For example, 9.* does not run on versions of Dyalog older than 18.0.

A bump of the minor number indicates added functionality plus possibly bug fixes.

A bump of the patch number indicates bug fixes.

## Version 9.3.0 from 2021-12-14

* Because of the danger involved Fire's "Replace" now 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.

## Version 9.2.1 from 2021-10-24

* "Case sensitive" in the ""Search QNL" report" did not work.
Expand Down
Binary file modified Fire.dws
Binary file not shown.
2 changes: 1 addition & 1 deletion Fire.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; This script is best executed by Fire's "Make" utility.

#define MyAppVersion "9.2.1+208"
#define MyAppVersion "9.3.0+211"
#define MyAppName "Fire"
#define MyAppExeName "Fire.dws"
#define MyAppPublisher "APL Team Ltd"
Expand Down
Binary file modified Make/Make.DWS
Binary file not shown.
Binary file modified TestResults/CodeCoverage.dcf
Binary file not shown.
Loading

0 comments on commit 5003593

Please sign in to comment.