-
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.
Handling of <watch> improved and Help polished
- Loading branch information
Showing
17 changed files
with
184 additions
and
54 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
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,29 @@ | ||
r←ProcessLinkOptions(parms config);path;filename;msg | ||
r←⎕NS'' | ||
path←config.CIDER.source{0=≢⍺:⍵ ⋄ ⍵,'/',⍺}parms.folder | ||
filename←(F.AddTrailingSep path),'.linkconfig' | ||
:If F.IsFile filename | ||
:If 0≢parms.watch | ||
r.watch←parms.watch ⍝ Was specified by the user, and that takes (temporarily) precendence | ||
:EndIf | ||
:If 9=config.⎕NC'LINK' | ||
:AndIf 0<≢config.LINK.⎕NL⍳16 | ||
:AndIf 0=parms.batch | ||
msg←'' | ||
msg,←⊂'There is a file .linkconfig in:' | ||
msg,←⊂F.EnforceSlash path | ||
msg,←⊂'but there is also a non-empty "Link" section in Cider''s config file' | ||
msg,←⊂'which will be ignored because of the .linkconfig file.' | ||
msg,←⊂'Consider deleting the "Link" section from Cider''s config file!' | ||
Box Frame msg | ||
:EndIf | ||
:Else | ||
r←ExtractLinkOptions config ⍝ Merge the default options with Cider's options | ||
:If 0≢parms.watch | ||
config.LINK.watch←parms.watch ⍝ Was specified by the user, and that takes (temporarily) precendence | ||
:ElseIf 2=r.⎕NC'watch' | ||
parms.watch←r.watch | ||
:Else | ||
parms.watch←(1+HasDotNet)⊃'ns' 'both' ⍝ Default is "both" but for the time being only when .NET is available | ||
: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
{r}←ReportLinkSettings cfg;list | ||
{r}←{ignore}ReportLinkSettings linkOptions;list;defaults;ind;b;list2 | ||
⍝ Report all Link settings (if any) that differ from their default | ||
⍝ `cfg` is a namespace representing a project's Cider config file. | ||
r←'' | ||
list←' '~⍨¨↓cfg.LINK.⎕NL 2 | ||
:If 0<≢list | ||
r←cfg∘{'LINK:',⍵,'=',⍕⍺.LINK⍎⍵}¨list | ||
ignore←{2=⎕NC ⍵:⍎⍵ ⋄ ''}'ignore' | ||
:If ~(⊂linkOptions)∊''⍬ | ||
list←' '~⍨¨↓linkOptions.⎕NL 2 | ||
list←list~⊆ignore | ||
:If 0<≢list | ||
defaults←⎕SE.Link.U.DefaultOpts ⍬ | ||
list2←' '~⍨¨↓defaults.⎕NL 2 | ||
ind←list2⍳list | ||
(list ind)←(ind≤≢list2)∘/¨list ind | ||
:AndIf ∨/b←(linkOptions.⍎¨list)≢¨defaults.⍎¨list2[ind] ⍝ Where does the actual value differ from the default? | ||
r←linkOptions.{⍵,'=',⍎⍵}¨b/list | ||
: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
r←batchFlag ReportWatch msgs | ||
⍝ "msgs" is what was return by Link's `Create` or `Import` function. | ||
⍝ Returns the setting of Link's "watch" parameter. | ||
⍝ Because it is so important it is always reported, even when it carries the default. | ||
r←'' | ||
:If ~batchFlag | ||
r←'Link parameter "watch" is <' | ||
r,←,{ | ||
∨/'←→'⍷⍵:'both' | ||
∨/'←'⍷⍵:'dir' | ||
∨/'→'⍷⍵:'ns' | ||
'none' | ||
}msgs | ||
r,←,'>' | ||
: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
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,7 +1,3 @@ | ||
r←Version | ||
⍝ See also `History` | ||
<<<<<<< HEAD | ||
r←'0.41.0+671' | ||
======= | ||
r←'0.41.1+671' | ||
>>>>>>> dev | ||
r←'0.42.0+671' |
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,31 @@ | ||
R←Test_Open_053(stopFlag batchFlag);⎕TRAP;parms;qdmx;filename;success;log | ||
⍝ Open a project with watch=none | ||
⎕TRAP←(999 'C' '∘∘∘ ⍝ Deliberate error')(0 'N') | ||
R←T._Failed | ||
|
||
'TEMP'#.⎕NS'' | ||
|
||
parms←##.Cider.CreateOpenParms ⍬ | ||
parms.folder←∆GetTestPath⊃⎕SI | ||
parms.parent←'#.TEMP' | ||
parms.watch←'none' | ||
parms.ignoreUserExec←1 | ||
parms.batch←1 | ||
filename←parms.folder,'/APLSource/Hello.aplf' | ||
(⊂'r←Hello' 'r←''World''')⎕NPUT filename 1 | ||
##.Cider.C.YesOrNo_Answers←1 2⍴'ChangeCurrentDir@' 'n' | ||
|
||
(success log)←##.Cider.OpenProject parms | ||
Assert success | ||
→T.GoToTidyUp∨/'ERROR'⍷log | ||
|
||
→T.GoToTidyUp'none'≢#.TEMP.Foo.CiderConfig.LINK.watch | ||
|
||
R←T._OK | ||
|
||
∆TidyUp: | ||
##.Cider.C.Cleanup | ||
{}(~parms.batch)⎕SE.Cider.CloseProject'#.TEMP.Foo' | ||
(⊂'r←Hello' 'r←''World''')⎕NPUT filename 1 | ||
#.⎕EX'TEMP' | ||
⍝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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
r←Hello | ||
r←'World' | ||
r←Hello | ||
r←'World' |
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,29 @@ | ||
{ CIDER: { init: "", make: "", parent: "#", projectSpace: "Foo", project_url: "", source: "APLSource", dependencies: { tatin: "packages", }, dependencies_dev: { tatin: "packages_dev=TestCases", }, tests: "", }, LINK: { watch: "ns", }, SYSVARS: { io: 1, ml: 1, }, USER: { },} | ||
{ | ||
CIDER: { | ||
cider_version: "0.42.0", | ||
dependencies: { | ||
nuget: "", | ||
tatin: "packages", | ||
}, | ||
dependencies_dev: { | ||
tatin: "packages_dev=TestCases", | ||
}, | ||
distributionFolder: "", | ||
init: "", | ||
make: "", | ||
parent: "#", | ||
projectSpace: "Foo", | ||
project_url: "", | ||
source: "APLSource", | ||
tests: "", | ||
}, | ||
LINK: { | ||
watch: "ns", | ||
}, | ||
SYSVARS: { | ||
io: 1, | ||
ml: 1, | ||
}, | ||
USER: { | ||
}, | ||
} |
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