Skip to content

Commit b499bb2

Browse files
authored
WasmFS: Enable warnings on using FS without FORCE_FILESYSTEM (#19704)
I'm not sure why these were disabled, but likely early in WasmFS development they caused some kind of problem. Now they seem to work ok, and are necessary for an important test to pass, which is enabled here.
1 parent 656bd5c commit b499bb2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/preamble.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ function abort(what) {
494494

495495
#include "memoryprofiler.js"
496496

497-
#if ASSERTIONS && !('$FS' in addedLibraryItems) && !WASMFS
497+
#if ASSERTIONS && !('$FS' in addedLibraryItems)
498498
// show errors on likely calls to FS when it was not included
499499
var FS = {
500500
error: function() {

test/test_other.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7556,10 +7556,11 @@ def test_override_c_environ(self):
75567556
output = self.run_js('run.js')
75577557
self.assertContained('|world|', output)
75587558

7559+
@also_with_wasmfs
75597560
def test_warn_no_filesystem(self):
75607561
error = 'Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM'
75617562

7562-
self.run_process([EMCC, test_file('hello_world.c')])
7563+
self.emcc(test_file('hello_world.c'))
75637564
seen = self.run_js('a.out.js')
75647565
self.assertNotContained(error, seen)
75657566

0 commit comments

Comments
 (0)