[m-rev.] for review: workaround feedback tool problem on Windows

Julien Fischer jfischer at opturion.com
Mon May 6 16:48:14 AEST 2013


For review by Paul.

Branches: 13.05, master

Workaround the failure of the feedback tests on Windows.

deep_profiler/mdprof_create_feedback.m:
The feedback tool does not need to set the server or script names in
the deep profiling data structure.  (They are only required by the
CGI interface.)  Attempting to determine the server name is currently
failing on Windows, so just pass a dummy one in the feedback tool
for now.

Eventually we should fix this so that (1) CGI interface specific things
are not part of the deep/0 structure and (2) looking up the hostname
on Windows works.

Julien.

diff --git a/deep_profiler/mdprof_create_feedback.m
b/deep_profiler/mdprof_create_feedback.m
index 7017957..044eb7c 100644
--- a/deep_profiler/mdprof_create_feedback.m
+++ b/deep_profiler/mdprof_create_feedback.m
@@ -304,8 +304,12 @@ write_version_message(ProgName, !IO) :-
     io::di, io::uo) is det.

 read_deep_file(Input, Debug, MaybeDeep, !IO) :-
-    server_name_port(Machine, !IO),
-    script_name(ScriptName, !IO),
+    % XXX the server_name_port and script_name fields of the deep/0
+    % structure are only required by the CGI program.  (They probably
+    % shouldn't be part of that structure since not all tools that operate
+    % on deep profiles require them.)
+    Machine = "DummyServer",
+    ScriptName = "DummyScript",
     (
         Debug = yes,
         io.stdout_stream(Stdout, !IO),
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20130506/6af4a1e8/attachment.html>


More information about the reviews mailing list