Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

34
LINES

< > BotCompany Repo | #1035542 // TranspileForServer_v2 - successor of TranspileForServer

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (12836L/75K).

1  
// doesn't compile locally, just uploads and compiles on server
2  
srecord noeq TranspileForServer_v2(S progID) {
3  
  new RunTranspiler runTranspiler;
4  
  S server = tb_mainServer();
5  
  
6  
  S javax;
7  
  PairS uploadResults;
8  
  
9  
  run {
10  
    javax = loadSnippet(progID);
11  
    print("Source: " + l(javax));
12  
  
13  
    long time = sysNow();
14  
  
15  
    time "Transpile" {
16  
      S java;
17  
      try {
18  
        runTranspiler.mainSnippetID(progID);
19  
        java = runTranspiler.get(javax);
20  
      } on fail e {
21  
        printLineContextAfterJavaCompilerError(e, loadProgramTextFile("error.java"));
22  
      }
23  
      print("Transpiled: " + l(java));
24  
    }
25  
26  
    new LS libs;
27  
    java = findTranslators2(java, libs);
28  
    print("Libs: " + or2(joinWithComma(libs), "-"));
29  
30  
    uploadResults = uploadTranspilation(progID, java, libs);
31  
32  
    print("Transpiled & uploaded " + fsI(progID) + "!");
33  
  }
34  
}

Author comment

Began life as a copy of #1033535

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035542
Snippet name: TranspileForServer_v2 - successor of TranspileForServer
Eternal ID of this version: #1035542/4
Text MD5: b1c70d42667c54329ed96a469a828c84
Transpilation MD5: dafdf17018eaf2ebf7f5977805195fad
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-06-11 00:48:07
Source code size: 887 bytes / 34 lines
Pitched / IR pitched: No / No
Views / Downloads: 100 / 171
Version history: 3 change(s)
Referenced in: [show references]