oakmound / oak

A pure Go game engine
Apache License 2.0
1.55k stars 83 forks source link

Default OSFallback to false for JS builds #183

Closed 200sc closed 2 years ago

200sc commented 2 years ago

For JS targets, a call to the standard library's os package to open a file will always error. This change alters the fileutil package, where all of oak's os file calls happen (outside of driver specific operations), to default to not make OS calls if the embedded file system fails a file lookup.

codecov-commenter commented 2 years ago

Codecov Report

Merging #183 (9f0c3f2) into master (8ce1c67) will decrease coverage by 0.04%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #183      +/-   ##
==========================================
- Coverage   92.72%   92.67%   -0.05%     
==========================================
  Files         141      141              
  Lines        6406     6406              
==========================================
- Hits         5940     5937       -3     
- Misses        406      410       +4     
+ Partials       60       59       -1     
Impacted Files Coverage Δ
drawLoop.go 54.71% <0.00%> (-5.67%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8ce1c67...9f0c3f2. Read the comment docs.

Implausiblyfun commented 2 years ago

Do we think we need to have a story for running js builds in ci?