Skip to content

Commit 9bcf16c

Browse files
authored
Merge pull request #748 from cs136/staging
Re-enable offline mode in staging/stable.
2 parents e4aa2e5 + 5971ebb commit 9bcf16c

File tree

12 files changed

+39
-12
lines changed

12 files changed

+39
-12
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ ELSE()
6161
SET(GIT_DIRTY True)
6262
ENDIF()
6363

64-
set(SEASHELL_VERSION "3.0.2")
64+
set(SEASHELL_VERSION "3.0.3")
6565
if(GIT_DIRTY)
6666
set(GIT_COMMIT_HASH "${GIT_COMMIT_HASH}-dirty")
6767
endif()

doc/release/3.0.3.scrbl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#lang scribble/manual
2+
@(require "../utils.rkt")
3+
4+
@seashell-title[#:tag "build-3.0.3"]{v.3.0.3}
5+
Summary:
6+
@itemlist[
7+
@item{Re-enable offline mode.}
8+
@item{Fix issue with Racket listening on two TCP/IP sockets (which caused socket unavailable issues).}
9+
]

doc/release/main.scrbl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ version of Seashell.
2222
@include-section["3.0.0.scrbl"]
2323
@include-section["3.0.1.scrbl"]
2424
@include-section["3.0.2.scrbl"]
25+
@include-section["3.0.3.scrbl"]

src/collects/seashell-config.rkt.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@
175175
(cons 'project-settings-filename (string->path ".project-settings.txt"))
176176

177177
;; These flags can be overridden by the configuration file.
178+
;; Listen IP (default ::0)
179+
(cons 'listen-ip "::0")
178180
;; Default compiler flags.
179181
(cons 'compiler-flags '(;; Warning flags.
180182
"-Wall" "-Werror=int-conversion" "-Werror=int-to-pointer-cast" "-Werror=return-type" "-Werror=import-preprocessor-directive-pedantic" "-Werror=incompatible-pointer-types"

src/collects/seashell/backend/dispatch.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
[(list pid test-name "error" exit-code stderr stdout asan-output)
116116
(send-message connection `#hash((id . -4) (success . #t)
117117
(result . #hash((pid . ,pid) (test_name . ,test-name) (result . "error")
118-
(exit_code . ,exit-code)
118+
(status . ,exit-code)
119119
(stderr . ,(bytes->string/utf-8 stderr #\?))
120120
(stdout . ,(bytes->string/utf-8 stdout #\?))
121121
(asan_output . ,(bytes->string/utf-8 asan-output #\?))))))]

src/collects/seashell/backend/server.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@
318318
#:dispatch seashell-dispatch
319319
#:port 0
320320
#:dispatch-server-connect@ ssl-unit
321-
#:listen-ip #f
321+
#:listen-ip (read-config 'listen-ip)
322322
#:confirmation-channel conf-chan))
323323
(define start-result (async-channel-get conf-chan))
324324
(when (exn? start-result)

src/frontend/frontend/console.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ angular.module('frontend-app')
6969
// frame: column, file, frame#, function, function_offset, line, module, offset
7070
// raw message
7171
maybe_log(err);
72+
if(!err) {
73+
self.write("AddressSanitizer output is not available.\n");
74+
return;
75+
}
7276
if(err.error_type == "unknown" && err.raw_message === "") { return; }
7377
var to_print = [];
7478
to_print.push("Memory error occurred! Type of error: " + err.error_type);
@@ -201,7 +205,11 @@ angular.module('frontend-app')
201205
self.write(res.stdout);
202206
self.write('---\n');
203207
self.write('Expected output (stdout):\n');
204-
printExpectedFromDiff(res);
208+
if('diff' in res) {
209+
printExpectedFromDiff(res);
210+
} else if('expect' in res) {
211+
self.write(res.expect);
212+
}
205213
self.write('---\n');
206214
self.write('Produced errors (stderr):\n');
207215
self.write(res.stderr);
@@ -211,7 +219,7 @@ angular.module('frontend-app')
211219
}
212220
} else if(res.result==="error") {
213221
self.write('----------------------------------\n');
214-
self.write(sprintf("Test \"%s\" caused an error (with return code %d)!\n", res.test_name, res.exit_code));
222+
self.write(sprintf("Test \"%s\" caused an error (with return code %d)!\n", res.test_name, res.status));
215223
self.write('Produced output (stdout):\n');
216224
self.write(res.stdout);
217225
self.write('---\n');

src/frontend/frontend/file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ angular.module('frontend-app')
661661
if (conts.data.length === 0) self.loaded = true;
662662
self.project.updateMostRecentlyUsed(self.question, self.folder, self.file);
663663
self.editor.clearHistory();
664-
if (conts.history.slice(1).length > 1) {
664+
if (conts.history && conts.history.slice(1).length > 1) {
665665
self.undoHistory = JSON.parse(conts.history);
666666
self.editor.setHistory(self.undoHistory);
667667
} else {

src/frontend/frontend/modals.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ angular.module('frontend-app')
273273
// Write default contents.
274274
if (extension === 'c' || extension === 'h') {
275275
result = project.createFile($scope.new_file_folder, question, filename,
276-
sprintf("/**\n File: %s\nEnter a description for this file.\n*/\n", filename));
276+
sprintf("/**\n File: %s\n Enter a description for this file.\n*/\n", filename));
277277
} else if (extension === 'rkt') {
278278
result = project.createFile($scope.new_file_folder, question, filename,
279-
sprintf("#lang racket\n;; File %s\n;;Enter a description for this file.\n", filename));
279+
sprintf("#lang racket\n;; File %s\n;; Enter a description for this file.\n", filename));
280280
} else {
281281
result = project.createFile($scope.new_file_folder, question, filename);
282282
}

src/frontend/frontend/templates/settings-template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ <h4 class="modal-title">
5959
Disabled
6060
</label>
6161
<label class="radio-inline">
62-
<input name="offline-mode" type="radio" ng-model="temp.offline_mode" ng-value="1" disabled>
62+
<input name="offline-mode" type="radio" ng-model="temp.offline_mode" ng-value="1">
6363
Enabled
6464
</label>
6565
<label class="radio-inline">
66-
<input name="offline-mode" type="radio" ng-model="temp.offline_mode" ng-value="2" disabled>
66+
<input name="offline-mode" type="radio" ng-model="temp.offline_mode" ng-value="2">
6767
Forced
6868
</label>
6969
</div>

0 commit comments

Comments
 (0)