hdl_checker
hdl_checker copied to clipboard
New Files not being added to the Project
Issue details
Hello,
Before I get into it, just wanna say that I absolutely love hdl_checker
, it has made my development at work so much more streamlined.
I have noticed this issue a couple times, and decided to make an example reproducible thing and report it. I have noticed that if you already have a project defined (with .hdl_checker.config
and .hdl_checker/
at the root) in which there have already been compiled sources; then you create a new file, it doesn't get added to the project, even though it is defined (by a glob. or explicitly defined) in the project file. So I get an error [HDL Checker] [W] Path "/home/sgower/test/test1.vhd" not found in project file"
. Deleting the .hdl_checker
directory and reopening the file makes it work.
When opening an issue, make sure you provide
-
hdl_checker -V
:0.7.3
-
python3 --version
:Python 3.8.5
- Ubuntu 20.04
-
vsim -version
:Model Technology ModelSim - Intel FPGA Edition vsim 2020.3 Simulator 2020.07 Jul 22 2020
- I am using CoC and neovim as my client/editor
vim version: NVIM v0.4.3
node version: v15.14.0
coc.nvim version: 0.0.80-825a54d780
coc.nvim directory: /home/sgower/.config/nvim/plugged/coc.nvim
term: xterm-256color
platform: linux
HDL Checker Log
INFO | 08:39:49 | hdl_checker.server @ run():213 MainThread | Starting server. Our PID is 326080, no parent PID to attach to. Version string for hdl_checker is '0.7.3'
INFO | 08:39:49 | pygls.feature_manager @ add_builtin_feature():97 MainThread | Registered builtin feature exit
INFO | 08:39:49 | pygls.feature_manager @ add_builtin_feature():97 MainThread | Registered builtin feature initialize
INFO | 08:39:49 | pygls.feature_manager @ add_builtin_feature():97 MainThread | Registered builtin feature initialized
INFO | 08:39:49 | pygls.feature_manager @ add_builtin_feature():97 MainThread | Registered builtin feature shutdown
INFO | 08:39:49 | pygls.feature_manager @ add_builtin_feature():97 MainThread | Registered builtin feature textDocument/didChange
INFO | 08:39:49 | pygls.feature_manager @ add_builtin_feature():97 MainThread | Registered builtin feature textDocument/didClose
INFO | 08:39:49 | pygls.feature_manager @ add_builtin_feature():97 MainThread | Registered builtin feature textDocument/didOpen
INFO | 08:39:49 | pygls.feature_manager @ add_builtin_feature():97 MainThread | Registered builtin feature workspace/didChangeWorkspaceFolders
INFO | 08:39:49 | pygls.feature_manager @ add_builtin_feature():97 MainThread | Registered builtin feature workspace/executeCommand
INFO | 08:39:49 | pygls.feature_manager @ decorator():164 MainThread | Registered initialize with options {}
INFO | 08:39:49 | pygls.feature_manager @ decorator():164 MainThread | Registered initialized with options {}
INFO | 08:39:49 | pygls.feature_manager @ decorator():164 MainThread | Registered textDocument/didSave with options {}
INFO | 08:39:49 | pygls.feature_manager @ decorator():164 MainThread | Registered textDocument/didChange with options {}
INFO | 08:39:49 | pygls.feature_manager @ decorator():164 MainThread | Registered textDocument/didOpen with options {}
INFO | 08:39:49 | pygls.feature_manager @ decorator():164 MainThread | Registered workspace/didChangeConfiguration with options {}
INFO | 08:39:49 | pygls.feature_manager @ decorator():164 MainThread | Registered textDocument/hover with options {}
INFO | 08:39:49 | pygls.feature_manager @ decorator():164 MainThread | Registered textDocument/references with options {}
INFO | 08:39:49 | pygls.feature_manager @ decorator():164 MainThread | Registered textDocument/definition with options {}
INFO | 08:39:49 | pygls.server @ start_io():166 MainThread | Starting IO server
INFO | 08:39:49 | pygls.protocol @ bf_initialize():567 MainThread | Language server initialized Object(processId=326064, rootPath='/home/sgower/test', rootUri='file:///home/sgower/test', capabilities=Object(workspace=Object(applyEdit=True, workspaceEdit=Object(documentChanges=True, resourceOperations=['create', 'rename', 'delete'], failureHandling='textOnlyTransactional'), didChangeConfiguration=Object(dynamicRegistration=True), didChangeWatchedFiles=Object(dynamicRegistration=True), symbol=Object(dynamicRegistration=True, symbolKind=Object(valueSet=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]), tagSupport=Object(valueSet=[1])), executeCommand=Object(dynamicRegistration=True), configuration=True, workspaceFolders=True), textDocument=Object(publishDiagnostics=Object(relatedInformation=True, versionSupport=False, tagSupport=Object(valueSet=[1, 2])), synchronization=Object(dynamicRegistration=True, willSave=True, willSaveWaitUntil=True, didSave=True), completion=Object(dynamicRegistration=True, contextSupport=True, completionItem=Object(snippetSupport=True, commitCharactersSupport=True, documentationFormat=['markdown', 'plaintext'], deprecatedSupport=True, preselectSupport=True, tagSupport=Object(valueSet=[1])), completionItemKind=Object(valueSet=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])), hover=Object(dynamicRegistration=True, contentFormat=['markdown', 'plaintext']), signatureHelp=Object(dynamicRegistration=True, contextSupport=True, signatureInformation=Object(documentationFormat=['markdown', 'plaintext'], activeParameterSupport=True, parameterInformation=Object(labelOffsetSupport=True))), definition=Object(dynamicRegistration=True), references=Object(dynamicRegistration=True), documentHighlight=Object(dynamicRegistration=True), documentSymbol=Object(dynamicRegistration=True, symbolKind=Object(valueSet=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]), hierarchicalDocumentSymbolSupport=True, tagSupport=Object(valueSet=[1])), codeAction=Object(dynamicRegistration=True, isPreferredSupport=True, codeActionLiteralSupport=Object(codeActionKind=Object(valueSet=['', 'quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source', 'source.organizeImports']))), codeLens=Object(dynamicRegistration=True), formatting=Object(dynamicRegistration=True), rangeFormatting=Object(dynamicRegistration=True), onTypeFormatting=Object(dynamicRegistration=True), rename=Object(dynamicRegistration=True, prepareSupport=True), documentLink=Object(dynamicRegistration=True, tooltipSupport=True), typeDefinition=Object(dynamicRegistration=True), implementation=Object(dynamicRegistration=True), declaration=Object(dynamicRegistration=True), colorProvider=Object(dynamicRegistration=True), foldingRange=Object(dynamicRegistration=True, rangeLimit=5000, lineFoldingOnly=True), selectionRange=Object(dynamicRegistration=True)), window=Object(workDoneProgress=True)), initializationOptions=Object(), trace='off', workspaceFolders=[Object(uri='file:///home/sgower/test', name='test')], clientInfo=Object(name='coc.nvim', version='0.0.80'), workDoneToken='717d2446-93fa-4661-bbcf-518c59da7d4a')
INFO | 08:39:49 | pygls.protocol @ _send_data():381 MainThread | Sending data: {"id": 0, "jsonrpc": "2.0", "result": {"capabilities": {"textDocumentSync": 2, "hoverProvider": true, "definitionProvider": true, "referencesProvider": true, "documentHighlightProvider": false, "documentSymbolProvider": false, "workspaceSymbolProvider": false, "codeActionProvider": false, "documentFormattingProvider": false, "documentRangeFormattingProvider": false, "renameProvider": false, "executeCommandProvider": {"commands": []}, "workspace": {"workspaceFolders": {"supported": true, "changeNotifications": true}}}}}
INFO | 08:39:50 | hdl_checker.database @ _updatePathLibrary():353 Thread-2 | Setting library for '/home/sgower/test/test1.vhd' to 'not_in_project'
INFO | 08:39:50 | hdl_checker.builders.msim @ build():428 Thread-2 | Forcing build of /home/sgower/test/test1.vhd
INFO | 08:39:50 | pygls.protocol @ _send_data():381 Thread-2 | Sending data: {"jsonrpc": "2.0", "method": "textDocument/publishDiagnostics", "params": {"uri": "file:///home/sgower/test/test1.vhd", "diagnostics": [{"range": {"start": {"line": 6, "character": 4}, "end": {"line": 6, "character": 4}}, "message": "Port 'i_clk' is never used", "severity": 3, "code": null, "source": "HDL Checker/static", "relatedInformation": null}, {"range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}, "message": "Path \"/home/sgower/test/test1.vhd\" not found in project file", "severity": 2, "code": null, "source": "HDL Checker", "relatedInformation": null}]}}
Here is a simple test project that shows the error. I realize you won't be able to use it perfectly given the path names, but here's a list of steps to reproduce it, but you can still use the source files and the config file.
- Put
test.vhd
into the project directory (don't puttest1.vhd
) - Open it and run hdl_checker on it
- Move
test1.vhd
into the project, and open it. - It should show the error.
I haven't tried it with other compilers, but I feel like this wouldn't be modelsim specific.
EDIT: It seems that in addition to deleting the .hdl_checker/
directory, touch .hdl_checker.config
and restarting the editor also worked. Is this an intended behavior, to not reprocess the config file every time, only if its timestamp is newer?