Closed jfcherng closed 5 years ago
Okay. It looks like I am in another project which is mounted on E:
and I just casually open a test.cpp
from C:
and SL gets broken like above.
@kaste Another thing that I noticed is that if I fill the executable
setting with g++
, SL cannot find it. But if I fill it with ["g++"]
, SL is able to find it... I am not sure is this by-design or a bug.
http://www.sublimelinter.com/en/stable/linter_settings.html#executable
"g++": {
"disable": false,
// "executable": "g++", // <----------- unable to locate "g++"
"executable": ["g++"], // <-------------- works, omitted will work as well
"args": ["-std=c++17", "-fsyntax-only"],
"I": [
"${folder}/include",
"C:\\boost\\include\\boost-1_70",
"/usr/local/include",
"/usr/local/halide/include",
"/usr/local/systemc-2.3.1/include",
],
"excludes": [],
},
Since the current linter cannot work with the latest SL4, merging this is better than nothing. If there are some edge cases that are not considered, we can fix them later.
You hard-code the executable in the cmd
to gcc
or g++
so there is no need and you actually shouldn't have to define the executable just to tell it the same name.
If you set executable
it currently assumes that you point it to a full abs path not just a name the system has to resolve. (But we could change that.) If you provide an array we currently skip all checks and just assume a happy path. (We can probably change that as well.)
@kaste I add it in the default settings mainly in order to make it more clear about how to change it and make it work. Say a person wants to use arm-none-eabi-gcc
but he may curious about the unable to locate "arm-none-eabi-gcc"
while it's indeed in his OS' PATH. Mandatorily using an absolute path here sounds weird to me since PATH can be always a fallback to be searched from.
I made an upstream issue.
@kaste I have changed
linter.py
to https://github.com/SublimeLinter/SublimeLinter-gcc/blob/d5ada91f87dbd5a5a6c5cfa825b3ed6484ab78af/linter.py. But it failed withValueError: path is on mount 'C:', start on mount 'E:'
. I do a quick search and it looks like a problem in SL itself but I don't think I am using symlink in this case?SL settings: