the-carlisle-group / Acre-Desktop

A simple Dyalog APL IDE plugin that introduces "projects" and allows you to keep your source code in Unicode text files.
MIT License
11 stars 1 forks source link

]openproject fails in v14 with process hanging up. #146

Closed norberturkiewicz closed 5 years ago

norberturkiewicz commented 5 years ago

I believe I narrowed one issue down to the codeTree function.

Acre-Desktop/APLSource/_code-0/fileTree-10.aplf

The result of line 14 is detailed with extra stuff that gets put into the file path to read in.

    src←⎕CMD'dir "',⍵,'" /A/S/-C'

value of src

 Volume in drive C is Windows
 Volume Serial Number is 90D2-98AD

 Directory of C:\GitHub\CarlisleGroup\CAS-6.0\APLSource

02/13/2019  10:00 AM    <DIR>          .
02/13/2019  10:00 AM    <DIR>          ..
02/13/2019  10:00 AM    <DIR>          Activation-1
02/13/2019  10:00 AM    <DIR>          ADO-7
02/13/2019  09:57 AM    <DIR>          APPLETS-7f
02/13/2019  10:00 AM    <DIR>          BATCHJOB-ff
02/13/2019  10:00 AM    <DIR>          BITMAPS-7f

Running the fucntion as below did the trick to load the code.

 fileTree←{⍺←⊢
     15≤⊃SV.aplver:{
         root←fPath ⍵,'/.'
         file←{⍵⊣⍵.(Path Size Date)←''⍬ ⍬}⎕NS''
         tree←{file dir←⍺ ⍵
             p t s d←0 1 2 3 _NINFO dir,'/*'
             (sub z z)(p s d)←↓¨(1 2=⊂t)/¨⊂↑p s d
             file.(Path Size Date),←p s d
             ∇⍨/sub,file
         }
         r←file tree root
         r⊣r.Date←DT.ts2dt↑r.Date
     }⍵

     ⎕USING←'System.IO'
     fns←('\\'⎕R'/')¨Directory.GetFiles ⍵'*.*'SearchOption.AllDirectories
     fi←{⎕NEW FileInfo(⊂⍵)}¨fns
     size←fi.Length
     date←⍎¨fi.LastWriteTime.ToString⊂⊂'yyyyMMdd.HHmmss'
     {⍵⊣⍵.(Path Date Size)←fns date size}⎕NS''

⍝ file object - complete tree - see folderObj
⍝ ⍵ string - file root path
⍝ ← scalar space with [Path Size Date] for all files in tree
⍝   Path will always contain '/' rather than '\'
⍝   Date is float YYYYMMDD.hhmmss (smaller and 1 vs 7 per item)
 }
2019-02-13 12:39:47 Please wait - Reading 12389 files from .../CarlisleGroup/CAS-6.0/APLSource
2019-02-13 12:39:42 Opening from C:/GitHub/CarlisleGroup/CAS-6.0 to #.CAS
2019-02-13 12:39:41  Acre  5.0.5+125  2019-02-12  23.37
norberturkiewicz commented 5 years ago

Another function causing an issue with CMD. Here's a modified version.

 _NEXISTS←{
     15≤⊃ver←SV.aplver:⊢⎕NEXISTS ⍵
     path←'\'a_(=∘'/')⍵~'"'
     ⎕USING←'System.IO'
     ∨/(Directory File).Exists⊂⊂⍵
⍝  - see setEmulators
⍝ ⍵ file|folder
⍝ ← 0|1
⍝ Phil 2018-12-30 23.02
 }
PhilLast commented 5 years ago

Obviously the dir command behaves differently in different windows environments because it works perfectly in mine in all Dyalog versions.

The Unicode problem I solved with a function "dirMap" that's called in _NINFO but I forgot to insert it elsewhere.

Adding your options and attributes in buildWsFromSource worked, eventually, but not yet transferred to the other emulators.

I'll look at the other options but would like to have a set of working low-level tools to build on to make later use of future enhancements rather than a scattering of ad-hoc solutions.

On 2019-02-13 21:10, Norbert Jurkiewicz wrote:

Another function causing an issue with CMD

|NEXISTS←{ 15≤⊃ver←SV.aplver:⊢⎕NEXISTS ⍵ path←'\'a(=∘'/')⍵~'"' ⎕USING←'System.IO' ∨/(Directory File).Exists⊂⊂⍵ ⍝ - see setEmulators ⍝ ⍵ file|folder ⍝ ← 0|1 ⍝ Phil 2018-12-30 23.02 } |

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/the-carlisle-group/Acre-Desktop/issues/146#issuecomment-463372173, or mute the thread https://github.com/notifications/unsubscribe-auth/Ag16EChsoCgySv4LDdkvTOsUTiE9tS_0ks5vNH8pgaJpZM4a6BqZ.

norberturkiewicz commented 5 years ago

I would tend to stick with the .NET solution. Once we get .NET Core support this will work across all the OS’s

aplteam commented 5 years ago

.NET core support is a LOOOONG way to go. If at all that is...

On Wed, 13 Feb 2019 at 23:33, Norbert Jurkiewicz notifications@github.com wrote:

I would tend to stick with the .NET solution. Once we get .NET Core support this will work across all the OS’s

On Feb 13, 2019, at 5:31 PM, PhilLast <notifications@github.com<mailto: notifications@github.com>> wrote:

Obviously the dir command behaves differently in different windows environments because it works perfectly in mine in all Dyalog versions.

The Unicode problem I solved with a function "dirMap" that's called in _NINFO but I forgot to insert it elsewhere.

Adding your options and attributes in buildWsFromSource worked, eventually, but not yet transferred to the other emulators.

I'll look at the other options but would like to have a set of working low-level tools to build on to make later use of future enhancements rather than a scattering of ad-hoc solutions.

On 2019-02-13 21:10, Norbert Jurkiewicz wrote:

Another function causing an issue with CMD

|NEXISTS←{ 15≤⊃ver←SV.aplver:⊢⎕NEXISTS ⍵ path←'\'a(=∘'/')⍵~'"' ⎕USING←'System.IO' ∨/(Directory File).Exists⊂⊂⍵ ⍝ - see setEmulators ⍝ ⍵ file|folder ⍝ ← 0|1 ⍝ Phil 2018-12-30 23.02 } |

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub < https://github.com/the-carlisle-group/Acre-Desktop/issues/146#issuecomment-463372173>,

or mute the thread < https://github.com/notifications/unsubscribe-auth/Ag16EChsoCgySv4LDdkvTOsUTiE9tS_0ks5vNH8pgaJpZM4a6BqZ>.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/the-carlisle-group/Acre-Desktop/issues/146#issuecomment-463419258>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AFieis1SO55laepMdIFHgsR2jf0Rz-xDks5vNKBugaJpZM4a6BqZ>.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/the-carlisle-group/Acre-Desktop/issues/146#issuecomment-463419655, or mute the thread https://github.com/notifications/unsubscribe-auth/APt0ndPemDAQy_Obw91zggKB_tvuxtVQks5vNKDNgaJpZM4a6BqZ .

PhilLast commented 5 years ago

Once we get .NET Core support this will work across all the OS’s

This is fairly incidental in any case because all current emulations are to cover changes made since 14.0 which only Norbert is using in anger while Kai is using 15.0 and both only in windows. It seems unlikely that any new acre user is going to be asking for acre to be back-fed into Dyalog 14.0 or 15.0 for Mac OS or Linux.

The comment in my previous post

... to make later use of future enhancements ...

was written without much forethought and covers only situations that render it vacuous.

If Dyalog come up with any new enhancements that are worth using within acre at the bleeding edge then rather than throwing out the old, as with the file access, and having to reinstate an equivalent for versions left behind, any new changes will be covered from the beginning.

Enhancements @, ⍸, and ⊆ were never used within acre until the emulators were written and that entirely in APL rather than calling external facilities.

Dyalog is already Turing Complete. No new Dyalog features ever need to be used. Notwithstanding the joy of interval index.

norberturkiewicz commented 5 years ago

Fixed with the latest release 5.0.6+133