Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-Windows: ~/.dyalog needs to be added to the directories which are searched for Run.aplfs etc #10

Open
dyaandys opened this issue Jun 12, 2024 · 7 comments
Assignees

Comments

@dyaandys
Copy link
Contributor

dyaandys commented Jun 12, 2024

StartupSession.aplf@9d97012

In 19.0 on non-Windows platforms we currently look in the following directories for startup files (eg Run.aplf)
/opt/mdyalog/19.0/64/unicode
/home/andys/dyalog.files
/home/andys/dyalog.190U64.files

However, we are actually putting Tatin and Cider in /home/andys/.dyalog/dyalog.190U64.files.
While we think about all of this for 20.0, the immediate problem is to allow Cider to work in 19.0 on non-Windows platforms. My suggestion is to simply add /home/andys/.dyalog/dyalog.190U64.files to the list of directories to be searched. The following seems to work:

In StartupSession.aplf replace (line 107 ish):

     :If 0∊≢¨envVars
         defaults←{
             verSpec←{
                 ⍵:NoSlash 2⊃4070⌶⍬ ⍝ win only: version specific folder in user docs folder
                 num←∊2↑'.'Cut ver
                 uc←'UC'/⍨80 82=⎕DR'' ⍝ unicode/classic
                 bits←¯2↑'32',{⍵↓⍨⍵⍳'-'}os
                 home,'/dyalog.',num,uc,bits,'.files'
             }⍵
             user←⊃⎕NPARTS verSpec ⍝ /../
             verAgno←user,'dyalog.files' 'Dyalog APL Files'⊃⍨1+⍵
             ∊¨1 ⎕NPARTS dyalog verAgno verSpec ⍝ normalise
         }win
     :EndIf

with

     :If 0∊≢¨envVars
         defaults←{
             verSpec←{
                 ⍵:NoSlash 2⊃4070⌶⍬ ⍝ win only: version specific folder in user docs folder
                 num←∊2↑'.'Cut ver
                 uc←'UC'/⍨80 82=⎕DR'' ⍝ unicode/classic
                 bits←¯2↑'32',{⍵↓⍨⍵⍳'-'}os
                 ∊¨(,\home '/.dyalog'),¨⊂'/dyalog.',num,uc,bits,'.files'
             }⍵
             user←⊃⊃⎕NPARTS verSpec ⍝ /../
             verAgno←∊¨(,\user '.dyalog/'),¨⊂'dyalog.files' 'Dyalog APL Files'⊃⍨1+⍵
             ∊¨1 ⎕NPARTS (⊂dyalog),verAgno,verSpec ⍝ normalise
         }win
     :EndIf
@abrudz
Copy link
Member

abrudz commented Jun 14, 2024

I'm afraid we can't just do that, since that folder wouldn't be one of the default three (installation, version agnostic, version specific). We could instruct people to set the DYALOGSTARTUPSE config param or we could change to install Tatin and Cider in the correct location.

@xpqz
Copy link

xpqz commented Aug 13, 2024

Can you elaborate on why this is problematic? It's clearly designed to be extensible (hence the DYALOGSTARTUPSE env var).

@abrudz
Copy link
Member

abrudz commented Aug 14, 2024

Sure, it is extensible, but if the effective value when not making changes isn't the default value, then the default isn't really a default.

@xpqz
Copy link

xpqz commented Aug 14, 2024 via email

@abrudz
Copy link
Member

abrudz commented Aug 14, 2024

Maybe we're talking by each other? If I understand correctly, @dyaandys is asking for the default to be changed, while I'm saying that one should just use the extension mechanism to make things work.

@dyaandys
Copy link
Contributor Author

.. I am asking for something which without a user having to do anything, allows non-Windows users to use Tatin and Cider. My suggestion of adding an additional directory to the search path is only for 19.0 .. we'll have to branch qSE for 20.0 as it'll have different and acceptable set of directories.

@abrudz
Copy link
Member

abrudz commented Aug 14, 2024

19.0's session startup system is behaving as designed and documented. Why not just put Cider and Tatin into the correct location instead of making 19.0 look in the wrong location?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants