defold / editor2-issues

DEPRECATED
44 stars 4 forks source link

Editor 2 tries to parse Google services resources #1067

Open mathiaswking opened 7 years ago

mathiaswking commented 7 years ago

When using Google services, you have a google-service.json file in your bundle. The way we do that is by specifying a resources folder in game.project: project.bundle_resources = /res

In this case, when starting the Editor 2, it parses the .json file and outputs an error (see below). (Used the example project from #1039 )

It could be argued that the files in the resource folders (bundle_resources + native extensions resources) shouldn't be be parsed at all, or that they should be treated differently.

2017-07-12 10:19:26.322 WARN default editor.defold-project - {:line 90, :msg "Unable to load resource '/res/android/google-services.json'"} java.lang.Exception: JSON error (unexpected character): < at clojure.data.json$_read.invokeStatic(json.clj:226) at clojure.data.json$_read.invoke(json.clj:177) at clojure.data.json$read.invokeStatic(json.clj:272) at clojure.data.json$read.doInvoke(json.clj:228) at clojure.lang.RestFn.invoke(RestFn.java:410) at clojure.lang.AFn.applyToHelper(AFn.java:154) at clojure.lang.RestFn.applyTo(RestFn.java:132) at clojure.core$apply.invokeStatic(core.clj:648) at clojure.core$apply.invoke(core.clj:641) at clojure.data.json$read_str.invokeStatic(json.clj:278) at clojure.data.json$read_str.doInvoke(json.clj:274) at clojure.lang.RestFn.invoke(RestFn.java:410) at editor.json$load_json.invokeStatic(json.clj:36) at editor.json$load_json.invoke(json.clj:35) at editor.defold_project$load_node.invokeStatic(defold_project.clj:86) at editor.defold_project$load_node.invoke(defold_project.clj:77) at editor.defold_project$load_resource_nodes$iter1745217456$fn17457$fn17458.invoke(defold_project.clj:110) at editor.defold_project$load_resource_nodes$iter1745217456$fn17457.invoke(defold_project.clj:103) at clojure.lang.LazySeq.sval(LazySeq.java:40) at clojure.lang.LazySeq.seq(LazySeq.java:49) at clojure.lang.ChunkedCons.chunkedNext(ChunkedCons.java:59) at clojure.lang.ChunkedCons.next(ChunkedCons.java:43) at clojure.lang.RT.next(RT.java:688) at clojure.core$next4341.invokeStatic(core.clj:64) at clojure.core$dorun.invokeStatic(core.clj:3033) at clojure.core$doall.invokeStatic(core.clj:3039) at clojure.core$doall.invoke(core.clj:3039) at editor.defold_project$load_resource_nodes.invokeStatic(defold_project.clj:102) at editor.defold_project$load_resource_nodes.invoke(defold_project.clj:100) at editor.defold_project$load_nodesBANG.invokeStatic(defold_project.clj:114) at editor.defold_project$load_nodesBANG.invoke(defold_project.clj:112) at editor.defold_project$load_project$fn17532.invoke(defold_project.clj:168) at clojure.lang.AFn.applyToHelper(AFn.java:152) at clojure.lang.AFn.applyTo(AFn.java:144) at clojure.core$apply.invokeStatic(core.clj:646) at clojure.core$with_bindingsSTAR.invokeStatic(core.clj:1881) at clojure.core$with_bindingsSTAR.doInvoke(core.clj:1881) at clojure.lang.RestFn.invoke(RestFn.java:425) at editor.defold_project$load_project.invokeStatic(defold_project.clj:166) at editor.defold_project$load_project.invoke(defold_project.clj:160) at editor.defold_project$open_projectBANG.invokeStatic(defold_project.clj:691) at editor.defold_project$open_projectBANG.invoke(defold_project.clj:682) at editor.boot_open_project$open_project.invokeStatic(boot_open_project.clj:266) at editor.boot_open_project$open_project.invoke(boot_open_project.clj:261) at clojure.lang.AFn.applyToHelper(AFn.java:160) at clojure.lang.AFn.applyTo(AFn.java:144) at clojure.core$apply.invokeStatic(core.clj:646) at clojure.core$apply.invoke(core.clj:641) at editor.boot$open_project_with_progress_dialog$fn19522.invoke(boot.clj:129) at editor.ui$modal_progress$fn13226$fn13231$fn__13232.invoke(ui.clj:1426) at editor.ui$modal_progress$fn13226$fn13231.invoke(ui.clj:1425) at clojure.core$binding_conveyor_fn$fn__4676.invoke(core.clj:1938) at clojure.lang.AFn.call(AFn.java:18) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

RagnarSvenssonKing commented 7 years ago

Internal note: invalid json files should be accepted, yet produce errors on their json output channels.