[polari] build: Adjust js78 test to modules



commit 979ffec5da022626ba036ab71bbd47b15649e15f
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jun 25 18:13:26 2021 +0200

    build: Adjust js78 test to modules
    
    js78's compile-only mode doesn't work with ES modules, not even
    when adding the -m option (because it trips over gi:// imports).
    
    After some IRC discussions and some more trial and error, it turns
    out that we can keep the tests when we jump through some hoops.

 src/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/meson.build b/src/meson.build
index efd7108f..669eb4b8 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -38,7 +38,7 @@ foreach js_source : js_sources
 
   if (js_shell.found())
     test('Checking syntax of ' + js_source, js_shell,
-      args: ['-c', js_source],
+      args: ['-e', 'parseModule(read("@0@"))'.format(js_source)],
       workdir: meson.current_source_dir()
     )
   endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]