Sublime Forum

Flummoxed by SublimeREPL again

#1

Really hard to get the dependencies working when settings across 4 files must be synchronized. I have compared my inputs to 2 other language repl’s that work and in my blindness I cannot see what I am doing wrong.

Error when loading the racket REPL from SublimeREPL: File Not Found Error(2, ‘No such file or directory’). Of course, the error doesn’t say which of several directories or files can’t be found.

Here are the 3 dependencies:

  1. Racket language support from package Racket.sublime-package. Inside the archive is a file called ‘Racket.tmLanguage’. This is the one I reference as the syntax for the REPL. Selecting it for a source file of type .rkt the basic things seem to work adequately. it is not the richest of language files, but it does syntax highlighting and basic completions. OK.

  2. One of the SublimeREPL config files for a language: ‘Default.sublime-commands’ in the config directory for Racket:

{
        "caption": "SublimeREPL: Racket",
        "command": "run_existing_window_command", "args":
        {
            "id": "repl_plt_racket",
            "file": "config/Racket/Main.sublime-menu"
        }
    }
  1. The second SublimeREPL config file for Racket, as referred to above, 'Main.sublime-menu:
[
    {
        "id": "tools",
        "children": [
            {
                "caption": "SublimeREPL",
                "mnemonic": "R",
                "id": "SublimeREPL",
                "children": [
                    {
                        "command": "repl_open",
                        "caption": "Racket",
                        "id": "repl_plt_racket",
                        "mnemonic": "R",
                        "args": {
                            "type": "subprocess",
                            "encoding": "utf8",
                            "cmd": ["racket"],
                            "soft_quit": "\n(exit)\n",
                            "cwd": "$folder",
                            "cmd_postfix": "\n",
                            "extend_env": {"INSIDE_EMACS": "1"},
                            "syntax": "Racket.tmLanguage",
                            "external_id": "racket"
                        }
                    }
                ]
            }
        ]
    }
]
  1. And, critically ‘racket’ has to be installed and in my path. It is as follows:
➜  ~ which racket
/Applications/Racket v8.9/bin/racket

and it does run (I’ll spare you the terminal output).

Ugh… …this whole thing is so brittle. What am I missing?

0 Likes

#2

I’m at my wits end. These entries look exactly like 2 other language REPLS that work perfectly. There is some hidden file mapping problem that I cannot for the life of me see. Sublime Text is not open source even if the packages are. HQ needs to curate the most important packages for quality and reliability and see that they are maintained. It is not fair for a for profit company (even if there is barely any profit) to rely entirely on volunteers. The volunteers should demand compensation or cease volunteering. Then, we’ll see how long Sublime Text can survive. The volunteer contributions have been essential to the survival of Sublime Text.

Please, please, please: documentation is lacking, error messages give no help: where is the file not found? There are 3 possible files. Sublime Text file searching is a bit opaque.

I’ve changed the config for sublimerepl to:


    {
        "id": "tools",
        "children": [
            {
                "caption": "SublimeREPL",
                "mnemonic": "R",
                "id": "SublimeREPL",
                "children": [
                    {
                        "command": "repl_open",
                        "caption": "Racket",
                        "id": "repl_racket",
                        "mnemonic": "R",
                        "args": {
                            "type": "subprocess",
                            "encoding": "utf8",
                            "cmd": ["racket"],
                            "soft_quit": "\n(exit)\n",
                            "cwd": "$folder",
                            "cmd_postfix": "\n",
                            "extend_env": {"INSIDE_EMACS": "1"},
                            "syntax": "Installed Packages/Racket/Racket.tmLanguage",
                            "external_id": "racket"
                        }
                    }
                ]
            }
        ]
    }

This is about as explicit as can be. The Racket.sublime-package is a “new style” package, but with an old text mate bundle inside. I’ve provided the path directly to the file, or so it seems.

Now what?

0 Likes