set directory to store the compiler artifacts #149
-
I was wondering if there is a way to set the object directory for |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
-
I'm using |
Beta Was this translation helpful? Give feedback.
-
Can you post the logs from the log channel? I can't tell much from this. Also, the paths get resolved against your project's root, |
Beta Was this translation helpful? Give feedback.
-
I have this as my settings "fortran.linter.modOutput":"../obj",
"fortran.linter.includePaths": ["../obj"],
"fortran.linter.compiler": "ifort", I tried this with |
Beta Was this translation helpful? Give feedback.
-
Here's the output for ["INFO" - 12:48:47 am] using linter: ifort located in: /opt/intel/oneapi/compiler/2021.3.0/linux/bin/intel64/ifort
["INFO" - 12:48:47 am] Linter.arguments:
-warn
all
["INFO" - 12:48:47 am] Linter.moduleOutput: -module ../obj
["INFO" - 12:48:47 am] Initialising Language Server for workspace: /home/koushik/TMP/111/src/test.f90 with command-line options: --enable_code_actions, --hover_signature, --use_signature_help, --lowercase_intrinsics, --nthreads=4, --incremental_sync
[INFO - 00:48:47] fortls - Fortran Language Server 2.9.0 Initialized
[ERRO - 00:48:47] error handling request: {'jsonrpc': '2.0', 'method': 'workspace/didChangeConfiguration', 'params': {'settings': {'fortran': {'provide': {'autocomplete': 'fortls', 'hover': 'fortls', 'symbols': 'fortls'}, 'preferredCase': 'lowercase', 'linter': {'compiler': 'ifort', 'includePaths': ['../obj'], 'compilerPath': '', 'extraArgs': [], 'modOutput': '../obj'}, 'formatting': {'formatter': 'fprettify', 'findentArgs': [], 'fprettifyArgs': ['-i 4', '-w 2', '--enable-replacements', '--c-relations', '--enable-decl', '--whitespace-intrinsics=False', '--whitespace-print=False'], 'path': ''}, 'fortls': {'path': 'fortls', 'configure': '', 'notifyInit': False, 'incrementalSync': True, 'nthreads': 4, 'sortKeywords': False, 'symbolTypes': True, 'suffixes': [], 'directories': [], 'excludeSuffixes': [], 'excludeDirectories': [], 'preprocessor': {'suffixes': [], 'directories': [], 'definitions': {}}, 'disableDiagnostics': False, 'maxLineLength': -1, 'maxCommentLineLength': -1, 'extraArgs': [], 'disableAutoupdate': False, 'disabled': False, 'preserveKeywordOrder': None}, 'includePaths': None, 'gfortranExecutable': None, 'linterEnabled': None, 'linterExtraArgs': None, 'linterModOutput': None, 'provideSymbols': None, 'symbols': None, 'provideHover': None, 'provideCompletion': None}}}}
Traceback (most recent call last):
File "/home/koushik/.local/lib/python3.8/site-packages/fortls/langserver.py", line 160, in handle
handler(request)
File "/home/koushik/.local/lib/python3.8/site-packages/fortls/langserver.py", line 1487, in serve_default
raise JSONRPC2Error(
fortls.langserver.JSONRPC2Error |
Beta Was this translation helpful? Give feedback.
-
So I think I got to the bottom of this. The Intel compilers when using the syntax and semantics checking option As far as I can tell this is a limitation from |
Beta Was this translation helpful? Give feedback.
-
But if I just manually open every single file, the mod files are created but in the src directory not in the object directory. |
Beta Was this translation helpful? Give feedback.
-
Also needed to mention in case of gfortran, I also have to manually open each file in vs code for the mod file to be created. They are not automatically created when the workspace is opened |
Beta Was this translation helpful? Give feedback.
-
The original issue has now been fixed in fortran-lang/vscode-fortran-support#539. |
Beta Was this translation helpful? Give feedback.
-
Okay I will check once it gets released. |
Beta Was this translation helpful? Give feedback.
The original issue has now been fixed in fortran-lang/vscode-fortran-support#539.
As for the .mod file generation I was mistaken, the linter in general will not produce .mod files for files that are not open.