bugfixes
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 23 Jun 2023 14:34:54 +0000 (09:34 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 23 Jun 2023 14:34:54 +0000 (09:34 -0500)
CHANGELOG
core/encoding/json/encoder.onyx
scripts/onyx-pkg.onyx

index 383d84d96445f54e45f14fc777d7293e07430e7f..beb0d792f4a37f9dc56cb2c0e00e6665052b8d64 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,19 @@
+Release v0.1.5
+-----------
+Not released
+
+Additions:
+
+Removals:
+
+Changes:
+
+Bugfixes:
+- Fixed bug in `json.encode` that caused arrays of structures to not be outputted correctly.
+- Fixed bug in `onyx pkg` that caused `onyx pkg new` to not work as intended.
+
+
+
 Release v0.1.4
 -----------
 22nd June 2023
index c596fe1e4929a33c6b3408a35ca6f269a3f576d6..2182f22774daa7861b252e7ce26a2fbd1a99c9bb 100644 (file)
@@ -182,7 +182,6 @@ encode :: (w: ^io.Writer, data: any) -> Encoding_Error {
 
             a := cast(^Type_Info_Dynamic_Array) info;
             arr := cast(^core.array.Untyped_Array) data.data;
-            data  := arr.data;
             count := arr.count;
 
             for i: count {
index b8a693dd3237b5f3ba5c2604b21dc1ad2b570e70..fcb101a9e14b21e1b7864d527bb465ab159c5705 100644 (file)
@@ -503,7 +503,7 @@ run_new_command :: (args: [] cstr) {
     }
 
     template_dir := Template_Directory();
-    template_file := tprintf("{}{}.json", template_dir, template_name);
+    template_file := os.path_join(template_dir, tprintf("{}.json", template_name));
     if !os.file_exists(template_file) {
         error_print("Template '{}' not found in {}\n", template_name, template_dir);
         return;