-
Notifications
You must be signed in to change notification settings - Fork 10
Update README for dune-built CodeHawk #221
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
Update README for dune-built CodeHawk #221
Conversation
0063960
to
42898b4
Compare
chb/util/Config.py
Outdated
elif self.platform == "macOS": | ||
self.macOSdir = os.path.join(self.binariesdir, "macOS") | ||
self.chx86_analyze = os.path.join(self.macOSdir, "chx86_analyze") | ||
if self.codehawkdir is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have to concerns with this:
- it looks like it will break existing users (me for sure, but external people could be affected too?) plus the containers we generate
- i'm generally against code guessing things? it tends to be fragile and require gnarly code.
if your goal is to make it more straightforward then i would advocate for:
- keep existing set up as default to avoid breaking people (it's probably okay to stop advertising it as a supported configuration though if you dislike it and henny agrees with you :-).
- if binaries are not in the old default place, and there's no local config, assume it will be in the $PATH? I'll admit that this step is not great as there's no trivial way to check if the binaries are there, but it is a standard process for installing software (at least in linux 🤷 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused -- I thought, from the meeting earlier this week, that this implementation would match the way that you and Henny use CH/CHB/CHC. I must have misunderstood!
I'd be fine using a $PATH based approach. The main question there would be whether we check for the old binary names or the new ones. From my limited understanding of Dune the (only?) way to get the binaries built under the old names (public_name
in Dune terminology) is to use the exes.install
target for dune build
, which is less flexible than the non-installation approach discussed here, because exes.install
installs all the executables, whereas dune build CHB
allows for more focused rebuilding, avoiding building things you know you won't use even if Dune considers them to be out of date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused -- I thought, from the meeting earlier this week, that this implementation would match the way that you and Henny use CH/CHB/CHC. I must have misunderstood!
Sorry! Henny uses ConfigLocal.py
, I copy the binaries out of the ocaml build folder into where the python frontends expect them to be #hard-customers
I'd be fine using a $PATH based approach. The main question there would be whether we check for the old binary names or the new ones
ugh, i forgot about this. I have the monday brain and thus no useful solution to propose. Let's talk about it with Henny tomorrow?
README.md
Outdated
(or ConfigLocal.py) in `chb/util/` to its location. You can check the configuration | ||
with | ||
|
||
If this repository is placed within, or next to, the `codehawk` checkout, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it really okay/wise to do a git checkout of a repo inside of another repo? #asking-for-a-friend :-P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several downsides to doing it, yeah. But, again, I thought it was what you and Henny are doing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, i don't think either one of us is doing that :-P
chb/util/Config.py
Outdated
self.chx86_analyze = os.path.join(self.codehawkdir, "CodeHawk", | ||
"_build", "default", "CHB", "bchcmdline", "bCHXBinaryAnalyzer.exe") | ||
else: | ||
self.cparser = "<no codehawkdir!>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this what chkx info
will print?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ chkx info
Analyzer configuration:
-----------------------
analyzer : /home/ben/codehawk/CodeHawk/_build/default/CHB/bchcmdline/bCHXBinaryAnalyzer.exe (found)
summaries: /home/ben/CodeHawk-Binary/chb/summaries/bchsummaries.jar (found)
$ mv ../codehawk ../invisiblecodehawk
$ chkx info
Analyzer configuration:
-----------------------
analyzer : <no codehawkdir!> (not found)
summaries: /home/ben/CodeHawk-Binary/chb/summaries/bchsummaries.jar (found)
chb/util/Config.py
Outdated
if self.codehawkdir is not None: | ||
# Look for non-installed binaries by default | ||
self.cparser = os.path.join(self.codehawkdir, "CodeHawk", | ||
"_build", "default", "CHC", "cchcil", "cCHXParseFile.exe") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know the binary analyzer uses the c parser command. I've never copied it over!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's a recent addition
chb/util/Config.py
Outdated
if viable_alts: | ||
self.codehawkdir = viable_alts[0] | ||
|
||
## analyzer executables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no need for double ##
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
No description provided.