suoto / vim-hdl Goto Github PK
View Code? Open in Web Editor NEWVim plugin to aid VHDL development (for LSP, see https://github.com/suoto/hdl_checker)
License: GNU General Public License v3.0
Vim plugin to aid VHDL development (for LSP, see https://github.com/suoto/hdl_checker)
License: GNU General Public License v3.0
Hi, vim-hdl tool seems to be perfect and I am very excited to try it. When starting vim with a vhd file, following error is reported.
Error detected while processing function vimhdl#setup[10]..59_startServer[6]..59_pyEval:
line 4:
Traceback (most recent call last):
File "", line 1, in
File "D:\programs\gVimPortable\App\vim\plugins\vim-hdl-master\python\vimhdl\vim_client.py", line 100, in startServer
self._startServerProcess()
...
...
...
My setup is as follows:
I installed hdlcc package to python. In anaconda prompt, when hdlcc is run, hdlcc server starts to run.
To install vim-hdl, the zip file of the repository is extracted and the following code is added to vimrc.
set runtimepath+=$VIM\plugins\vim-hdl-master
I checked previous issues and realized that there was no Windows support (by March 26,2018).
My questions are
Thank you for your time.
Built-in libraries are statically defined, which means that things will break on different environments. We can either use the compiler to get them somehow or create an option for the user to set manually. Using the compiler is the preferred approach.
Selecting the quickfix and pressing Enter
to jump to the problematic line yields E926.
From Vim help:
*E925* *E926*
If the current quickfix or location list was changed by an |autocommand| while
processing a quickfix or location list command, it will be aborted.
Tested with grlib lib/tech/ec/orca/orca.vhd and even after the project builds fine, there is nothing on the location list.
hdlcc logs look fine, but since the file is large (27k lines), the hdlcc client is probably timing out.
The client might need to continue in background if a timeout occurs, but the location list can only be updated synchronously. At least the user should be warned when a timeout occurs
vim-hdl has been added to vim.org so installing from there should be tested.
I have installed ghdl and vundle, and then vim-hdl and syntastic. So far tags and syntax are properly highlighted, and errors are reported as expected running SyntasticCheck (or just modifying and saving files). But each time I open an vhd file with vim, this message appears:
Error detected while processing BufEnter Auto commands for "*.vhd":
No handlers could be found for logger "vimhdl.vim_client"
Press ENTER or type command to continue
I'm using vim 7.4 on up-to-date ArchLinux.
Vim-hdl configuration should be done within Vim. Currently this is done via python/config.py
When starting vim I get following error:
Error detected while processing function vimhdl#setup..<SNR>73_Pyeval: line 2: Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/abyszuk/.vim/bundle/vim-hdl/python/vimhdl/vim_client.py", line 87, in startServer self._waitForServerSetup() File "/home/abyszuk/.vim/bundle/vim-hdl/python/vimhdl/vim_client.py", line 162, in _waitForServerSetup reply = request.sendRequest() File "/home/abyszuk/.vim/bundle/vim-hdl/python/vimhdl/base_requests.py", line 89, in sendRequest requests.packages.urllib3.exceptions.NewConnectionError) as exc: AttributeError: 'module' object has no attribute 'NewConnectionError' E858: Eval did not return a valid python object
I use quite standard install of CentOs 7. Python version 3.3
Some tests like https://travis-ci.org/suoto/vim-hdl/jobs/133960177 failed because vroom scripts don't wait until the project has finished building. One possible solution is to add something like a VimhdlWaitForBuild
command.
vim-hdl should bundle the six
package as a dependency is feasible
A full rebuild is currently needed when changing the configuration file. Implement runtime configuration file reloading.
When Vim is opened, vim_client.VimhdlClient.setup
is run in a thread and calls to vim_client.VimhdlClient.buildByPath
are locked until setup completes.
project_builder.ProjectBuilder
, taking into account errors (currently this is ignored)vim_client.VimhdlClient.buildByPath
to be run while vim_client.VimhdlClient.buildByDependency
is activecompilers.base_compiler.BaseCompiler
must be queued to avoid consistency errors by the compiler (it may not handle multiple threads accessing its internal DB)Expected result:
Some nice to haves:
Given a configured project and a project file named project.prj
, the steps to reproduce are
Build the project with hdlcc/runner.py
runner.py <path/to/project/file> --clean --build
Wait for the build to finish. There should be a filename called
.project.prj
, which is the cached info of the project file
Launching Vim and to a source inside the project gives the following error
$ vim <path/to/source>
Vim: Caught deadly signal SEGV
File
"<path/to/vim-hdl>/autoload/../dependencies/hdlcc/hdlcc/project_builder.py",
line 287, in _recoverCacheVim: Finished.
cache = pickle.load(open(cache_fname, 'r'))
AttributeError: 'module' object has no attribute
'StandaloneProjectBuilder'
Segmentation fault
Error is slightly different if the file is opened with gVim
$ gvim <path/to/source>
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been
called
[xcb] Aborting, sorry about that.
vim: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion
`!xcb_xlib_unknown_req_in_deq' failed.
Vim: Caught deadly signal ABRT
Brainstorm of topics:
g:vimhdl_conf_file
, b:vimhdl_conf_file
Hi there! Thanks for making this awesome tool. I see integration with Syntastic is possible, but what about ale? Is this currently possible?
I loaded syntastic and vim-hdl using native method of vim, and try to get the vim-hdl-examples/msim.prj running.
My .vimrc includes:
" Syntastic recommended settings
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" vim-hdl
let g:vimhdl_conf_file = '/home/user/vim-hdl-examples/msim.prj'
let g:syntastic_vhdl_checkers = ['vimhdl']
When I open the file vim-hdl-examples/another-library/foo.vhd , I get the following error output:
Error detected while processing CursorMoved Auto commands for "*.vhd":
Traceback (most recent call last):
Error detected while processing CursorMoved Auto commands for "*.vhd":
File "<string>", line 1, in <module>
Error detected while processing CursorMoved Auto commands for "*.vhd":
File "/home/user/.vim/pack/my-plugins/start/vim-hdl/python/vimhdl/vim_client.py", line 272, in requestUiMessages
Error detected while processing CursorMoved Auto commands for "*.vhd":
if not self._isServerAlive():
Error detected while processing CursorMoved Auto commands for "*.vhd":
File "/home/user/.vim/pack/my-plugins/start/vim-hdl/python/vimhdl/vim_client.py", line 113, in _isServerAlive
Error detected while processing CursorMoved Auto commands for "*.vhd":
is_alive = self._server.poll() is None
Error detected while processing CursorMoved Auto commands for "*.vhd":
AttributeError: 'NoneType' object has no attribute 'poll'
When I run hdlcc standalone, I do not get any errors.
The official distribution of Python 3 for Windows has the executable name python
instead of python3
. Normally vim can work with it, and echo has("python3")
returns 1. But it will cause a FileNotFoundError
in this plugin. Changing the executable of Python to python3
can solve this problem.
hdlcc is pure Python, so using https://github.com/warner/python-versioneer is easy. Vim-hdl should have a similar alternative.
Given a project built with a previous version of Vim (probably 9a8a6ae), opening it after upgrading to 870c8f8 crashes Vim.
This probably depends on hdlcc issue 4 (Fix project persistency implementation) issue being resolved first.
Vim log with -V15 is here: vim-hdl-issue.log.zip
Project build code should be on its own repository to allow creating plugins for other text editors
I get the following error
"vimhdl.vim" 201L, 7227C
Error detected while processing function vimhdl#setup..<SNR>44_setupPython:
line 32:
Traceback (most recent call last):
File "<string>", line 9, in <module>
AttributeError: 'module' object has no attribute 'NullHandler'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.