cbmc-starter-kit icon indicating copy to clipboard operation
cbmc-starter-kit copied to clipboard

Remove dependency on git to use starter-kit

Open jimgrundy opened this issue 2 years ago • 3 comments

Right now, if you attempt to use the starter kit outside of a Git repo you will get the following result:

cbmc % cbmc-starter-kit-setup
Traceback (most recent call last):
  File "/usr/local/bin/cbmc-starter-kit-setup", line 8, in <module>
    sys.exit(main())
  File "/usr/local/Cellar/cbmc-starter-kit/2.4/libexec/lib/python3.8/site-packages/cbmc_starter_kit/setup.py", line 73, in main
    source_root = repository.repository_root()
  File "/usr/local/Cellar/cbmc-starter-kit/2.4/libexec/lib/python3.8/site-packages/cbmc_starter_kit/repository.py", line 52, in repository_root
    raise UserWarning(f"No git repository contains {cwd}") from None
UserWarning: No git repository contains .

But, the starter kit seems to be becoming the default easy way for all users to get started using CBMC, and in this application the git dependency seems like an unneeded speed bump. If you are just starting out with CBMC or looking to evaluate it then the starter-kit should get you started fast.

Also, there are people out there who want to use CBMC with other version control systems. It would be a pitty of those people couldn't use the starter kit.

jimgrundy avatar Jul 11 '22 13:07 jimgrundy

We could add a command line option that would let the user specify the root instead of searching for the root.

markrtuttle avatar Aug 10 '22 13:08 markrtuttle

Maybe go further and make that the default with an option to infer the root if you are in a git repo.

jimgrundy avatar Aug 10 '22 13:08 jimgrundy

Let's add command line options --git-root and --src-root flags to specify them from command line. The sequence of defaults is --git-root if specified else search for git root else None. The sequence of defaults is --src-root if specified else git root else None.

markrtuttle avatar Aug 10 '22 14:08 markrtuttle