Changeset 394
- Timestamp:
- 09/23/08 19:27:34 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
jasko.tim.lisp/src/jasko/tim/lisp/swank/SBCLImplementation.java
r318 r394 206 206 commandLine.add(executable.getPath()); 207 207 commandLine.add("--eval"); 208 commandLine.add(LispUtil.cleanPackage(BreakpointAction.macro) );209 commandLine.add("--eval"); 210 commandLine.add(LispUtil.cleanPackage(WatchAction.macro) );211 commandLine.add("--eval"); 212 commandLine.add(" \"(require 'asdf)\"");208 commandLine.add(LispUtil.cleanPackage(BreakpointAction.macro).replace("`", "\\`")); 209 commandLine.add("--eval"); 210 commandLine.add(LispUtil.cleanPackage(WatchAction.macro).replace("`", "\\`")); 211 commandLine.add("--eval"); 212 commandLine.add("(require 'asdf)"); 213 213 if(prefs.getBoolean(PreferenceConstants.USE_UNIT_TEST)){ 214 214 commandLine.add("--load"); 215 commandLine.add( "\""+LispPlugin.getDefault().getPluginPath()216 + "lisp-extensions/lisp-unit.lisp \"");215 commandLine.add(LispPlugin.getDefault().getPluginPath() 216 + "lisp-extensions/lisp-unit.lisp"); 217 217 } 218 218 if(prefs.getBoolean(PreferenceConstants.MANAGE_PACKAGES)){ … … 222 222 + "lisp-extensions/asdf-extensions.lisp"; 223 223 commandLine.add("--load"); 224 commandLine.add( "\""+asdfext+"\"");224 commandLine.add(asdfext); 225 225 commandLine.add("--eval"); 226 commandLine.add( LispUtil.cleanPackage(code));226 commandLine.add(code); 227 227 } 228 228 … … 238 238 239 239 commandLine.add("--load"); 240 commandLine.add( "\""+asdFile+"\"");240 commandLine.add(asdFile); 241 241 commandLine.add("--eval"); 242 commandLine.add( LispUtil.cleanPackage("(asdf:oos 'asdf:load-op \""+asdName+"\")"));242 commandLine.add("(asdf:oos 'asdf:load-op \""+asdName+"\")"); 243 243 244 244 commandLine.add("--eval"); 245 245 if( pkg != null && !pkg.equals("") && !pkg.equalsIgnoreCase("nil")){ 246 commandLine.add( LispUtil.cleanPackage("(sb-ext:save-lisp-and-die \""247 +exeFile+"\" :executable t :toplevel '"+pkg+"::"+toplevel+" :purify t)") );246 commandLine.add("(sb-ext:save-lisp-and-die \"" 247 +exeFile+"\" :executable t :toplevel '"+pkg+"::"+toplevel+" :purify t)"); 248 248 } else { 249 commandLine.add( LispUtil.cleanPackage("(sb-ext:save-lisp-and-die \""250 +exeFile.replace('\\', '/')+"\" :executable t :toplevel '"+toplevel+" :purify t)") );249 commandLine.add("(sb-ext:save-lisp-and-die \"" 250 +exeFile.replace('\\', '/')+"\" :executable t :toplevel '"+toplevel+" :purify t)"); 251 251 } 252 252 253 commandLine.add("--eval"); 254 commandLine.add("(print 1)"); 255 commandLine.add("--eval"); 256 commandLine.add("(print 2)"); 253 257 String[] cmd = new String[commandLine.size()]; 254 258 ProcessBuilder pb = new ProcessBuilder(commandLine.toArray(cmd)); … … 258 262 LispPlugin.getDefault().out("--- compilation command:"); 259 263 for(String str : cmd){ 264 System.out.println("$" + str); 260 265 LispPlugin.getDefault().out(str); 261 266 } 262 267 LispPlugin.getDefault().out("--- compilation log:"); 268 pb.redirectErrorStream(true); 263 269 Process p = pb.start(); 264 BufferedReader is = new BufferedReader(new InputStreamReader(p.getInputStream())); 270 BufferedReader is = new BufferedReader(new InputStreamReader(p.getInputStream())); 271 265 272 String line; 266 273 while ((line = is.readLine()) != null){ 267 274 LispPlugin.getDefault().out(line); 268 275 if( line.contains("[QUIT ") ){ //ended up in debugger 276 /*BufferedReader es = new BufferedReader(new InputStreamReader(p.getErrorStream())); 277 String errline; 278 while ((errline = es.readLine()) != null){ 279 LispPlugin.getDefault().out(errline); 280 System.out.println(errline); 281 }*/ 269 282 p.destroy(); 270 283 LispPlugin.getDefault().out("=== Error."); 271 284 return false; 285 } else if (line.contains("DONE")) { 286 //hacky way to detect the finishing point. 287 break; 272 288 } 273 289 } jasko.tim.lisp/src/jasko/tim/lisp/swank/SwankInterface.java
r356 r394 1865 1865 } 1866 1866 System.out.print("]"); 1867 System.out.print (curr);1867 System.out.println(curr); 1868 1868 runFilters(curr); 1869 1869 if(curr.toLowerCase().contains(implementation.fatalErrorString())){
