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

ValueError: path is on mount 'C:', start on mount 'D:' #33

Open
itavero opened this issue Aug 14, 2024 · 0 comments
Open

ValueError: path is on mount 'C:', start on mount 'D:' #33

itavero opened this issue Aug 14, 2024 · 0 comments

Comments

@itavero
Copy link

itavero commented Aug 14, 2024

I'm running on Windows and have some external packages that are cached on my C: drive, while my active project is located on the D: drive.
While running the compdb -p build list, I get the following exception:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\itavero\AppData\Local\Programs\Python\Python311\Scripts\compdb.exe\__main__.py", line 7, in <module>
  File "C:\Users\itavero\AppData\Local\Programs\Python\Python311\Lib\site-packages\compdb\cli.py", line 291, in main
    command.execute(config, args.args)
  File "C:\Users\itavero\AppData\Local\Programs\Python\Python311\Lib\site-packages\compdb\cli.py", line 89, in execute
    included_by_database = builder.build(database)
                           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itavero\AppData\Local\Programs\Python\Python311\Lib\site-packages\compdb\includedb.py", line 272, in build
    pp.preprocess(compile_command)
  File "C:\Users\itavero\AppData\Local\Programs\Python\Python311\Lib\site-packages\compdb\includedb.py", line 72, in preprocess
    compdb.utils.get_friendly_path(includer),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itavero\AppData\Local\Programs\Python\Python311\Lib\site-packages\compdb\utils.py", line 73, in get_friendly_path
    rel_path = os.path.relpath(full_path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen ntpath>", line 766, in relpath
ValueError: path is on mount 'C:', start on mount 'D:'

Seems like it doesn't like it that files in the compilation database are on different drives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant