ocamldebug: load_printer raise uncaught exception when passing directory #6935
Original bug ID: 6935
When we pass a directory as an argument of load_printer, uncaught exception Sys_error("Is a directory") is always raised.
Steps to reproduce
OCaml Debugger version 4.02.2
(ocd) load_printer /
I have attached a patch to fix the problem.
Comment author: junsli
Hi, I tried to solve this.
Sys_error message is not consistent: Message for permission denied originally contains filename, but "Is a directory" does not.
Sys_error "./a.out: Permission denied"
Is it possible to bring str's regexp in debugger build? If so, we can print out generic "name: msg" (if msg does not contain name) or just "msg."
Comment author: @gasche
Sorry for being a bit terse in the two messages above. The reason we use the "junior_job" tag is precisely to motivate people to start contributing in small but useful ways, and your effort is much appreciated.
There are two ways to do code review:
You are free to use whichever of those systems have your personal preference (github used to be a second-class citizen used for an experiment only, but it is now the official development repository).
Since we are now using git as the version control for the official OCaml distribution repository, the easiest way to preserve authorship information for your patch is to send it in format that "git am" understands (that is, the output of "git format-patch"). This is done automatically by github if you use it, but it is of course also possible to upload a git-friendly patch here on Mantis. Otherwise, if you just upload a plain diff, a maintainer may commit it directly, marking you in the commit message as patch author. In this latter case, it is helpful if you can indicate in the comments somewhere the name under which you would like to be credited.
There are more information on how to contribute to OCaml in the CONTRIBUTING.md document:
Thanks for your contribution.
Comment author: junsli
Thanks for the explanation. It is clear now.
(I had read the CONTRIBUTING.md, but I saw people only provide patches on Mantis, which obscured some instructions in CONTRIBUTING.md, like send PR, merge request, push changes, etc.)
I'll follow the test process to get familiar with established workflow, and send PR on github.
Thanks again. Cheers.