json2cmake icon indicating copy to clipboard operation
json2cmake copied to clipboard

StopIteration

Open code4lala opened this issue 3 years ago • 0 comments

json2cmake failed and reported some error

fengziteng@ubuntu:~/temp$ ls
CMakeLists.txt  compile_commands.json
fengziteng@ubuntu:~/temp$ git init .
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>
Initialized empty Git repository in /home/fengziteng/temp/.git/
fengziteng@ubuntu:~/temp$ json2cmake
Traceback (most recent call last):
  File "/home/fengziteng/.local/bin/json2cmake", line 8, in <module>
    sys.exit(main())
  File "/home/fengziteng/.local/lib/python3.10/site-packages/json2cmake/__init__.py", line 222, in main
    database.read(args.infile)
  File "/home/fengziteng/.local/lib/python3.10/site-packages/json2cmake/__init__.py", line 103, in read
    parsecommand(
  File "/home/fengziteng/.local/lib/python3.10/site-packages/json2cmake/__init__.py", line 32, in parsecommand
    next(words)  # remove the initial 'cc' / 'c++'
StopIteration
fengziteng@ubuntu:~/temp$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
fengziteng@ubuntu:~/temp$ pip install --user json2cmake
Looking in indexes: https://repo.huaweicloud.com/repository/pypi/simple
Requirement already satisfied: json2cmake in /home/fengziteng/.local/lib/python3.10/site-packages (0.6.3)
fengziteng@ubuntu:~/temp$ uname -a
Linux ubuntu 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

the source ccjson is uploaded as an attachment below.

compile_commands.zip

code4lala avatar Oct 25 '22 08:10 code4lala