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

Does vcc syntax check work on linux? #11

Closed
VicSch opened this issue Feb 10, 2021 · 4 comments
Closed

Does vcc syntax check work on linux? #11

VicSch opened this issue Feb 10, 2021 · 4 comments
Labels

Comments

@VicSch
Copy link

VicSch commented Feb 10, 2021

Hello,
your VEX add-on for ST3 is really great! Thank you for this!
Vcc syntax check works on Window machine as expected, but i can't force it works on Linux. When i hit Ctrl+B it throws this error:

Exception in thread Thread-6:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "./python3.3/threading.py", line 858, in run
File "/home/victor/.config/sublime-text-3/Installed Packages/VEX.sublime-package/commands/vex_build.py", line 252, in worker
'characters': self.format_output(vcc),
File "/home/victor/.config/sublime-text-3/Installed Packages/VEX.sublime-package/commands/vex_build.py", line 335, in format_output
with open(file, encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'vcc-bin'

The path to vcc inside .sublime-build settings file is:

"executable": "/opt/hfs18.0.599/bin/vcc",

What did I miss?

Victor.

@teared teared added the bug label Feb 10, 2021
@teared
Copy link
Owner

teared commented Feb 10, 2021

Hello @VicSch! Thank you for reporting. It might happen if you don't have this line in the .sublime-build file:

"vex_output": "stdout",

It is used to avoid writing the compiled vex files on disk.

Otherwise, it's either a bug in the way I work with temporary files, or the regular expression is too strict. Can you show me the sample output? Save the code below to a file called test.vfl and try to compile it directly:

"/opt/hfs18.0.599/bin/vcc" "path/to/this/test.vfl" --context cvex --vex-output stdout

This should normally print compiled vex code to the console:

#define foo 1

This will provide the message that I'd like to look at:

#define123 foo 1

Thanks!

@VicSch
Copy link
Author

VicSch commented Feb 10, 2021

I've followed your instruction, copy-past .sublime-build file and just changed path to vcc, therefore that line of code is in .sublime-build file.
And as you asked.
First vex code:

;_name test
; ModuleID = 'test'

!context = !{!0}
!version = !{!1}
!precision = !{!2}

!0 = metadata !{metadata !"cvex"}
!1 = metadata !{metadata !"18.0.599"}
!2 = metadata !{metadata !"64"}

;_code_end

Second vex cod:

/home/victor/Documents/test.vfl:1:1: Error 1057: Undefined directive "define123"

teared added a commit that referenced this issue Feb 11, 2021
It now works on Linux machines:
    #11

Fixed a few bugs causing "VCC is currently running..."
state stuck until the editor restarted.

Temporary files used with "As a Snippet" build now removed sooner.
An exception could cause files to get stuck in the temp folder.
Temporary filename pattern: tmpxxxxxx

Several more VCC errors are displayed.

Improved Snippet error detection of bad "@" symbol usages.

See "Optional: Configure VCC Path" and "Syntax Check"
sections of the readme for the relevant info:

    https://github.com/teared/VEX#optional-configure-vcc-path
    https://github.com/teared/VEX#syntax-check
@teared
Copy link
Owner

teared commented Feb 11, 2021

Thank you, Victor. That's all I needed to know. I just pushed the new release, so the add-on will be updated via PaCo automatically. Cheers!

@VicSch
Copy link
Author

VicSch commented Feb 11, 2021

I've updated up to 7.1.4 and it works now without any errors.
Thank you very much.

@teared teared closed this as completed Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants