From 9c3e956a83fb8b5cd526911ae91366d0bbce16db Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Sat, 8 Apr 2023 08:41:44 -0400 Subject: [PATCH 01/33] * Add support for formatted integers * Update README and CHANGELOG * Update tests --- CHANGELOG.md | 25 +++- CMakeLists.txt | 2 +- README.md | 109 +++++++++++------- src/DataTypes/TOMLInt/TOMLInt.hpp | 3 + src/toml.cpp | 19 +-- tests/tables.lua | 70 ++++++++--- tests/tests.lua | 68 ++++++++++- ...-0.3.0-0.rockspec => toml-0.4.0-0.rockspec | 2 +- toml.d.tl | 25 +++- 9 files changed, 247 insertions(+), 76 deletions(-) rename toml-0.3.0-0.rockspec => toml-0.4.0-0.rockspec (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78129cc..35b3cac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,30 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.3.0](https://github.com/LebJe/toml.lua/releases/tag/0.2.0) - 2023-02-19 +## [0.4.0](https://github.com/LebJe/toml.lua/releases/tag/0.4.0) - 2023-04-07 + +### Added + +- `toml.Int` for formatted integers. + +```lua +local formattedIntegers = { + int1 = toml.Int.new(2582, toml.formatting.int.octal), + int2 = toml.Int.new(3483, toml.formatting.int.binary), + int3 = toml.Int.new(5791, toml.formatting.int.hexadecimal) +} + +print(toml.encode(formattedIntegers)) +--[[ +int1 = 0o5026 +int2 = 0b110110011011 +int3 = 0x169F +--]] +``` + +- `formattedIntsAsUserdata` can be passed to the options table of `toml.decode` (see "Decoding Options" in the README). + +## [0.3.0](https://github.com/LebJe/toml.lua/releases/tag/0.3.0) - 2023-02-19 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index ab3884c..5f50d42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ FetchContent_Declare( GIT_REPOSITORY "https://github.com/marzer/tomlplusplus.git" GIT_SHALLOW ON GIT_SUBMODULES "" - GIT_TAG "v3.3.0" + GIT_TAG "ad55bae8a11a6eee39e2292b01e95b529b105767" ) FetchContent_Declare( diff --git a/README.md b/README.md index 16b1691..2641091 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,14 @@ toml.lua is a [Lua](https://www.lua.org) wrapper around [toml++](https://github. - [JSON](#json) - [YAML](#yaml) - [Output Formatting](#output-formatting) + - [Formatting Integers](#formatting-integers) - [Formatting TOML, JSON, or YAML](#formatting-toml-json-or-yaml) - [Date and Time](#date-and-time) - [Dependencies](#dependencies) - [Licenses](#licenses) - [Contributing](#contributing) - + @@ -205,55 +206,74 @@ end - `temporalTypesAsUserData = false`: Lua tables are used to represent TOML date and time types. +> The default value is `true` + +##### `formattedIntsAsUserData` + +- `formattedIntsAsUserData = true`: The userdata type `toml.Int` is used to represent integers in octal, binary, or hexadecimal format. +- `formattedIntsAsUserData = false`: Integers in octal, binary, or hexadecimal format will be represented in decimal. + +> The default value is `false` + ```lua local tomlStr = [[ date = 1979-05-27 time = 07:32:00 datetime = 1979-05-27T07:32:00-07:00 + +hexadecimal = 0x16C3 +binary = 0b110110011011 +octal = 0x169F ]] -local table1 = toml.decode(tomlStr, { temporalTypesAsUserData = true }) -local table2 = toml.decode(tomlStr, { temporalTypesAsUserData = false }) +local table1 = toml.decode(tomlStr, { temporalTypesAsUserData = true, formattedIntsAsUserData = true }) +local table2 = toml.decode(tomlStr, { temporalTypesAsUserData = false, formattedIntsAsUserData = false }) print(inspect(table1)) --[[ { date = -- 1979-05-27, <-- toml.Date - time = -- 07:32:00, <-- toml.Time - datetime = -- 1979-05-27T07:32:00-07:00 <-- toml.DateTime + time = -- 07:32:00 <-- toml.Time + datetime = -- 1979-05-27T07:32:00-07:00, <-- toml.DateTime + binary = -- 0b10011011, <-- toml.Int (with `toml.formatting.int.binary` flag) + hexadecimal = -- 0x16c3, <-- toml.Int (with `toml.formatting.int.octal` flag) + octal = -- 0x169f, <-- toml.Int (with `toml.formatting.int.hexadecimal` flag) } --]] print(inspect(table2)) --[[ { - date = { - day = 27, - month = 5, - year = 1979 - }, - datetime = { - date = { - day = 27, - month = 5, - year = 1979 - }, - time = { - hour = 7, - minute = 32, - nanoSecond = 0, - second = 0 - }, - timeOffset = { - minutes = -420 - } - }, - time = { - hour = 7, - minute = 32, - nanoSecond = 0, - second = 0 - } + date = { + day = 27, + month = 5, + year = 1979 + }, + time = { + hour = 7, + minute = 32, + nanoSecond = 0, + second = 0 + }, + datetime = { + date = { + day = 27, + month = 5, + year = 1979 + }, + time = { + hour = 7, + minute = 32, + nanoSecond = 0, + second = 0 + }, + timeOffset = { + minutes = -420 + } + }, + binary = 3483, + hexadecimal = 5827, + octal = 5791, } --]] ``` @@ -412,10 +432,8 @@ print(yaml) ### Output Formatting - #### Formatting TOML, JSON, or YAML @@ -471,13 +502,13 @@ Passing an empty table removes all options, while not providing a table will use --- Allow non-ASCII characters in strings (as opposed to their escaped form, e.g. `\u00DA`). allow_unicode_strings = true, - --- Allow integers with `toml.formatting.int.binary` to be emitted as binary. (Not implemented yet) + --- Allow integers with `toml.formatting.int.binary` to be emitted as binary. allowBinaryIntegers = true, - --- Allow integers with `toml.formatting.int.octal` to be emitted as octal. (Not implemented yet) + --- Allow integers with `toml.formatting.int.octal` to be emitted as octal. allowOctalIntegers = true, - --- Allow integers with `toml.formatting.int.hexadecimal` to be emitted as hexadecimal. (Not implemented yet) + --- Allow integers with `toml.formatting.int.hexadecimal` to be emitted as hexadecimal. allowHexadecimalIntegers = true, --- Apply indentation to tables nested within other tables/arrays. diff --git a/src/DataTypes/TOMLInt/TOMLInt.hpp b/src/DataTypes/TOMLInt/TOMLInt.hpp index 0f6e168..2fd7dec 100644 --- a/src/DataTypes/TOMLInt/TOMLInt.hpp +++ b/src/DataTypes/TOMLInt/TOMLInt.hpp @@ -28,6 +28,9 @@ struct TOMLInt { int64_t getInt() const { return tomlInt.get(); } void setInt(int64_t int64) { tomlInt = int64; } + toml::value_flags getFlags() const { return tomlInt.flags(); } + void setFlags(toml::value_flags flags) { tomlInt.flags(flags); } + bool operator==(const TOMLInt & right) const { return tomlInt == right.tomlInt && tomlInt.flags() == right.tomlInt.flags(); } diff --git a/src/toml.cpp b/src/toml.cpp index 80eda60..9a09740 100644 --- a/src/toml.cpp +++ b/src/toml.cpp @@ -229,19 +229,20 @@ extern "C" { // Setup formatting flags - // auto formattingTable = module.create_named("formatting"); + auto formattingTable = module.create_named("formatting"); - // formattingTable.new_enum( - // "int", { { "binary", toml::value_flags::format_as_binary }, - // { "hexadecimal", toml::value_flags::format_as_hexadecimal }, - // { "octal", toml::value_flags::format_as_octal } }); + formattingTable.new_enum( + "int", { { "binary", toml::value_flags::format_as_binary }, + { "hexadecimal", toml::value_flags::format_as_hexadecimal }, + { "octal", toml::value_flags::format_as_octal } }); - // // Setup UserType = Int + // Setup UserType - Int - // sol::usertype tomlInt = module.new_usertype( - // "Int", sol::constructors()); + sol::usertype tomlInt = module.new_usertype( + "Int", sol::constructors()); - // tomlInt["int"] = sol::property(&TOMLInt::getInt, &TOMLInt::setInt); + tomlInt["int"] = sol::property(&TOMLInt::getInt, &TOMLInt::setInt); + tomlInt["flags"] = sol::property(&TOMLInt::getFlags, &TOMLInt::setFlags); // Setup UserType - Date diff --git a/tests/tables.lua b/tests/tables.lua index ac22823..2044175 100644 --- a/tests/tables.lua +++ b/tests/tables.lua @@ -2,24 +2,62 @@ local toml = require("toml") local M = {} M.tableForFormattingTest = { - asUserdata = { - dob = toml.DateTime.new(toml.Date.new(1979, 05, 27), toml.Time.new(7, 32, 0, 0), toml.TimeOffset.new(-8, 0)), - }, - asTables = { - dob = { - date = { - day = 27, - month = 5, - year = 1979, + temporalTypes = { + asUserdata = { + dob = toml.DateTime.new( + toml.Date.new(1979, 05, 27), + toml.Time.new(7, 32, 0, 0), + toml.TimeOffset.new(-8, 0) + ), + }, + asTables = { + dob = { + date = { + day = 27, + month = 5, + year = 1979, + }, + time = { + hour = 7, + minute = 32, + nanoSecond = 0, + second = 0, + }, + timeOffset = { + minutes = -480, + }, }, - time = { - hour = 7, - minute = 32, - nanoSecond = 0, - second = 0, + }, + }, + integers = { + asUserdata = { + formattedIntegers = { + int1 = toml.Int.new(2582, toml.formatting.int.octal), + int2 = toml.Int.new(3483, toml.formatting.int.binary), + int3 = toml.Int.new(5791, toml.formatting.int.hexadecimal), + table = { + int1 = toml.Int.new(2582, toml.formatting.int.octal), + int2 = toml.Int.new(3483, toml.formatting.int.binary), + int3 = toml.Int.new(5791, toml.formatting.int.hexadecimal), + }, + array = { + toml.Int.new(2582, toml.formatting.int.octal), + toml.Int.new(3483, toml.formatting.int.binary), + toml.Int.new(5791, toml.formatting.int.hexadecimal), + }, }, - timeOffset = { - minutes = -480, + }, + asTables = { + formattedIntegers = { + int1 = 2582, + int2 = 3483, + int3 = 5791, + table = { + int1 = 2582, + int2 = 3483, + int3 = 5791, + }, + array = { 2582, 3483, 5791 }, }, }, }, diff --git a/tests/tests.lua b/tests/tests.lua index 2c08c2c..f1e44ce 100644 --- a/tests/tests.lua +++ b/tests/tests.lua @@ -72,9 +72,30 @@ function TestDecoder:testInvalidInputs() end function TestDecoder:testFormattingOptions() - local asTables = - toml.decode(toml.encode(data.tableForFormattingTest.asUserdata), { temporalTypesAsUserData = false }) - lu.assertEquals(asTables, data.tableForFormattingTest.asTables) + -- Temporal types + local temporalTypesAsTables = toml.decode( + toml.encode(data.tableForFormattingTest.temporalTypes.asUserdata), + { temporalTypesAsUserData = false } + ) + lu.assertEquals(temporalTypesAsTables, data.tableForFormattingTest.temporalTypes.asTables) + + local temporalTypesAsUserData = toml.decode( + toml.encode(data.tableForFormattingTest.temporalTypes.asUserdata), + { temporalTypesAsUserData = true } + ) + lu.assertEquals(temporalTypesAsUserData, data.tableForFormattingTest.temporalTypes.asUserdata) + + -- Formatted Integers + + local unformattedIntegers = toml.decode( + toml.encode(data.tableForFormattingTest.integers.asUserdata), + { allowBinaryIntegers = false, allowHexadecimalIntegers = false, allowOctalIntegers = false } + ) + lu.assertEquals(unformattedIntegers, data.tableForFormattingTest.integers.asTables) + + local formattedIntegers = + toml.decode(toml.encode(data.tableForFormattingTest.integers.asUserdata), { formattedIntsAsUserData = true }) + lu.assertEquals(formattedIntegers, data.tableForFormattingTest.integers.asUserdata) end local function testFormatters(fileType, formatter) @@ -98,8 +119,8 @@ function TestFormatters:testYAMLFormatter() end function TestUserdataAccessors:testTemporalTypesAccessors() - local dateTime = data.tableForFormattingTest.asUserdata.dob - local dateTimeTable = data.tableForFormattingTest.asTables.dob + local dateTime = data.tableForFormattingTest.temporalTypes.asUserdata.dob + local dateTimeTable = data.tableForFormattingTest.temporalTypes.asTables.dob -- time offset lu.assertEquals(dateTime.timeOffset.minutes, dateTimeTable.timeOffset.minutes) @@ -116,4 +137,41 @@ function TestUserdataAccessors:testTemporalTypesAccessors() lu.assertEquals(dateTime.date.year, dateTimeTable.date.year) end +function TestUserdataAccessors:testIntAccessor() + -- Formatted + local fI = data.tableForFormattingTest.integers.asUserdata.formattedIntegers + + -- Unformatted + local uFI = data.tableForFormattingTest.integers.asTables.formattedIntegers + + lu.assertEquals(fI.int1.int, uFI.int1) + lu.assertEquals(fI.int1.flags, toml.formatting.int.octal) + + lu.assertEquals(fI.int2.int, uFI.int2) + lu.assertEquals(fI.int2.flags, toml.formatting.int.binary) + + lu.assertEquals(fI.int3.int, uFI.int3) + lu.assertEquals(fI.int3.flags, toml.formatting.int.hexadecimal) + + -- fI.table, uFI.table + lu.assertEquals(fI.table.int1.int, uFI.table.int1) + lu.assertEquals(fI.table.int1.flags, toml.formatting.int.octal) + + lu.assertEquals(fI.table.int2.int, uFI.table.int2) + lu.assertEquals(fI.table.int2.flags, toml.formatting.int.binary) + + lu.assertEquals(fI.table.int3.int, uFI.table.int3) + lu.assertEquals(fI.table.int3.flags, toml.formatting.int.hexadecimal) + + -- fI.array, uFI.array + lu.assertEquals(fI.array[1].int, uFI.array[1]) + lu.assertEquals(fI.array[1].flags, toml.formatting.int.octal) + + lu.assertEquals(fI.array[2].int, uFI.array[2]) + lu.assertEquals(fI.array[2].flags, toml.formatting.int.binary) + + lu.assertEquals(fI.array[3].int, uFI.array[3]) + lu.assertEquals(fI.array[3].flags, toml.formatting.int.hexadecimal) +end + os.exit(lu.LuaUnit.run()) diff --git a/toml-0.3.0-0.rockspec b/toml-0.4.0-0.rockspec similarity index 97% rename from toml-0.3.0-0.rockspec rename to toml-0.4.0-0.rockspec index ee72782..a944321 100644 --- a/toml-0.3.0-0.rockspec +++ b/toml-0.4.0-0.rockspec @@ -1,5 +1,5 @@ package = "toml" -version = "0.3.0-0" +version = "0.4.0-0" local v = version:gsub("%-%d", "") diff --git a/toml.d.tl b/toml.d.tl index 4ee08ae..25aae08 100644 --- a/toml.d.tl +++ b/toml.d.tl @@ -84,14 +84,31 @@ local record toml metamethod __tostring: function(DateTime): string end + + record Int + userdata + int: number + + new: function(int: number, flags: formatting.int): Int + + metamethod __tostring: function(Int): string + end + + record formatting + record int + binary: number + octal: number + hexadecimal: number + end + end record DecodingOptions - --formattedIntsAsUserData: boolean + formattedIntsAsUserData: boolean temporalTypesAsUserData: boolean end record EncodeToFileOptions - file: string, + file: string overwrite: boolean end @@ -127,13 +144,13 @@ local record toml indentArrayElements: boolean --- Combination of `indentSubTables` and `indentArrayElements`. - indentation: boolean, + indentation: boolean --- Emit floating-point values with relaxed (human-friendly) precision. --- Warning: Setting this flag may cause serialized documents to no longer round- --- trip correctly since floats might have a less precise value upon being written out --- than they did when being read in. Use this flag at your own risk. - relaxedFloatPrecision: boolean, + relaxedFloatPrecision: boolean --- Avoids the use of whitespace around key-value pairs. terseKeyValuePairs: boolean From 0ccc8b12e54bd7768a9f8147fbd5cd92af56f109 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Sun, 31 Dec 2023 21:13:24 -0500 Subject: [PATCH 02/33] Update MagicEnum & Toml++ Test both `decodeFromFile` and `decode` in `testInvalidInputs`. --- .github/ISSUE_TEMPLATE/bug-report.md | 23 +++++++++++++++-------- .github/ISSUE_TEMPLATE/feature_request.md | 9 ++++----- .gitignore | 6 +++++- .prettierrc | 6 ++++++ .prettierrc.toml | 4 ---- CHANGELOG.md | 4 ++-- CMakeLists.txt | 11 +++++------ LICENSE | 2 +- TODO.md | 1 - src/utilities/utilities.cpp | 2 +- src/utilities/utilities.hpp | 2 +- tests/tests.lua | 18 ++++++++++++++++-- 12 files changed, 56 insertions(+), 32 deletions(-) create mode 100644 .prettierrc delete mode 100644 .prettierrc.toml delete mode 100644 TODO.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 21d018c..7b19b46 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,24 +1,29 @@ --- -name: Bug report -about: Create a report to help us improve -title: '' +name: "Bug report" +about: "Create a report to help us improve" +title: "" labels: bug assignees: LebJe - --- ## Describe the bug + A clear and concise description of what the bug is. ## Version and Installation Info -* toml.lua version: -* Installation method: (Manual compilation or `luarocks install toml`) -* Compilation log, or Luarocks installation log: + +- toml.lua version: +- Operating system: +- Installation method: (Manual compilation or `luarocks install toml`) +- Compilation log, or Luarocks installation log: + ```shell -# For compilation logs, include the compilation command, and compiler version +# Paste installation or compilation log here +# For compilation logs, include the compilation command, and compiler version ``` ## To Reproduce + Provide a **minimal** TOML file that demonstrates the issue: ```toml @@ -33,7 +38,9 @@ local toml = require("toml") ``` ## Expected behavior + A clear and concise description of what you expected to happen. ## Additional context + Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index a6b3f1c..5085df2 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' +name: "Feature request" +about: "Suggest an idea for this project" +title: "" +labels: "" assignees: LebJe - --- **Is your feature request related to a problem? Please describe.** diff --git a/.gitignore b/.gitignore index 1b1dfc1..bc04c27 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,8 @@ compile_commands.json Brewfile.lock.json .vscode/ .nova/ -.vim/ \ No newline at end of file +.vim/ + +# Test files +test.lua +inspect.lua diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..1ee82da --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "trailingComma": "es5", + "tabWidth": 4, + "singleQuote": false, + "useTabs": true +} diff --git a/.prettierrc.toml b/.prettierrc.toml deleted file mode 100644 index 08b1562..0000000 --- a/.prettierrc.toml +++ /dev/null @@ -1,4 +0,0 @@ -trailingComma = "es5" -tabWidth = 4 -singleQuote = false -useTabs = true diff --git a/CHANGELOG.md b/CHANGELOG.md index 35b3cac..3e727d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.4.0](https://github.com/LebJe/toml.lua/releases/tag/0.4.0) - 2023-04-07 +## [0.4.0](https://github.com/LebJe/toml.lua/releases/tag/0.4.0) - 2023-12-31 ### Added @@ -37,7 +37,7 @@ int3 = 0x169F - `toml.encodeToFile(data: table, fileOrOptions: string|table)`: - Encodes `data` to the file specified in `fileOrOptions`. the file will be created if it doesn't exist. - When `fileOrOptions` is a string, it simply is the file path. - - When `fileOrOptions` is a table, it should have`file`, and optionally, `overwrite` as keys. `file` is the file path, and `overwrite` should be `true` when `file` should be `overwritten` with `data`, and `false` when `data` should be appended to `file`. + - When `fileOrOptions` is a table, it should have`file`, and optionally, `overwrite` as keys. `file` is the file path, and `overwrite` should be `true` when `file` should be overwritten with `data`, and `false` when `data` should be appended to `file`. - Added tests that cover: - The property accessors of `toml.Date`, `toml.Time`, `toml.DateTime`, and `toml.TimeOffset`. - `toml.toJSON` and `toml.toYAML`. diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f50d42..9695d7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ if(NOT TOML_LUA_VERSION) execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULT_VARIABLE ret - OUTPUT_VARIABLE LUA_RAPIDJSON_VERSION + OUTPUT_VARIABLE TOML_LUA_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) if(NOT ret EQUAL "0") @@ -41,7 +41,7 @@ FetchContent_Declare( GIT_REPOSITORY "https://github.com/marzer/tomlplusplus.git" GIT_SHALLOW ON GIT_SUBMODULES "" - GIT_TAG "ad55bae8a11a6eee39e2292b01e95b529b105767" + GIT_TAG "v3.4.0" ) FetchContent_Declare( @@ -57,13 +57,13 @@ FetchContent_Declare( GIT_REPOSITORY "https://github.com/Neargye/magic_enum.git" GIT_SHALLOW ON GIT_SUBMODULES "" - GIT_TAG "v0.8.2" + GIT_TAG "v0.9.5" ) FetchContent_GetProperties(${TOML++}) if(NOT ${TOML++}_POPULATED) message(STATUS "Cloning ${TOML++}") - FetchContent_Populate(${TOML++}) + #FetchContent_Populate(${TOML++}) FetchContent_MakeAvailable(${TOML++}) endif() @@ -107,7 +107,6 @@ else(UNIX) endif(WIN32) endif(UNIX) - if(NOT LUA_INCLUDE_DIR OR (WIN32 AND NOT LUA_LIBRARIES)) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") find_package(Lua) @@ -130,7 +129,7 @@ source_group(src FILES ${SOURCES}) if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") target_link_options(toml.lua PUBLIC ${PROJECT_SOURCE_DIR}\\libs\\lua51.lib) else() - target_link_libraries(toml.lua ${LUA_LIBRARIES}) + target_link_libraries(toml.lua ${LUA_LIBRARIES} tomlplusplus::tomlplusplus) endif() if (LINK_FLAGS) diff --git a/LICENSE b/LICENSE index 8bb1066..7928020 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Jeff Lebrun +Copyright (c) 2024 Jeff Lebrun Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 7fd8ba3..0000000 --- a/TODO.md +++ /dev/null @@ -1 +0,0 @@ -- Finish TOMLInt diff --git a/src/utilities/utilities.cpp b/src/utilities/utilities.cpp index 792415c..6533244 100644 --- a/src/utilities/utilities.cpp +++ b/src/utilities/utilities.cpp @@ -2,7 +2,7 @@ #include "Options.hpp" #include "toml.hpp" #include -#include +#include #include #include diff --git a/src/utilities/utilities.hpp b/src/utilities/utilities.hpp index 301e509..228f642 100644 --- a/src/utilities/utilities.hpp +++ b/src/utilities/utilities.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/tests.lua b/tests/tests.lua index f1e44ce..c5d8359 100644 --- a/tests/tests.lua +++ b/tests/tests.lua @@ -62,8 +62,22 @@ function TestDecoder:testInvalidInputs() reason = "Error while parsing key-value pair: cannot redefine existing integer as dotted key-value pair", } - local succeeded1, table1 = pcall(toml.decodeFromFile, "tests/test-data/invalidTable.toml") - local succeeded2, table2 = pcall(toml.decodeFromFile, "tests/test-data/multipleDotKeyInvalid.toml") + -- Test `decodeFromFile` + local decodeFromFileSucceeded1, decodeFromFileTable1 = + pcall(toml.decodeFromFile, "tests/test-data/invalidTable.toml") + local decodeFromFileSucceeded2, decodeFromFileTable2 = + pcall(toml.decodeFromFile, "tests/test-data/multipleDotKeyInvalid.toml") + + lu.assertFalse(decodeFromFileSucceeded1) + lu.assertFalse(decodeFromFileSucceeded2) + lu.assertEquals(decodeFromFileTable1, expectedError1) + lu.assertEquals(decodeFromFileTable2, expectedError2) + + -- Test `decode` + local invalidTable = read("tests/test-data/invalidTable.toml") + local multipleDotKeyInvalid = read("tests/test-data/multipleDotKeyInvalid.toml") + local succeeded1, table1 = pcall(toml.decode, invalidTable) + local succeeded2, table2 = pcall(toml.decode, multipleDotKeyInvalid) lu.assertFalse(succeeded1) lu.assertFalse(succeeded2) From 63a487ad9e0492bb4f4a5c0cad842ce1b3cb1e3c Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Sun, 31 Dec 2023 21:25:57 -0500 Subject: [PATCH 03/33] Update workflows Use `e-t-l/setup-mingw@patch-1` workflow --- .github/workflows/buildAndTest-Linux.yml | 2 +- .github/workflows/buildAndTest-MacOS.yml | 2 +- .github/workflows/buildAndTest-Windows.yml | 4 ++-- .github/workflows/pre-commit.yml | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/buildAndTest-Linux.yml b/.github/workflows/buildAndTest-Linux.yml index de2b197..8969603 100644 --- a/.github/workflows/buildAndTest-Linux.yml +++ b/.github/workflows/buildAndTest-Linux.yml @@ -16,7 +16,7 @@ jobs: "liblua5.1-0-dev lua5.1", ] steps: - - uses: "actions/checkout@v3" + - uses: "actions/checkout@v4" - name: "Add Dependencies" run: | export COMPILER=${{ matrix.compiler }} diff --git a/.github/workflows/buildAndTest-MacOS.yml b/.github/workflows/buildAndTest-MacOS.yml index 3dd2038..e780d42 100644 --- a/.github/workflows/buildAndTest-MacOS.yml +++ b/.github/workflows/buildAndTest-MacOS.yml @@ -9,7 +9,7 @@ jobs: matrix: lua: ["lua", "luajit"] steps: - - uses: "actions/checkout@v3" + - uses: "actions/checkout@v4" - name: "Install Dependencies" run: | brew install ${{ matrix.lua }} luarocks diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 5beec12..fc13331 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -9,7 +9,7 @@ jobs: matrix: compiler: ["LLVM", "MinGW"] steps: - - uses: "actions/checkout@v3" + - uses: "actions/checkout@v4" - name: "Install Dependencies" run: "choco install -y cmake ninja" - name: "Build LuaJIT" @@ -21,7 +21,7 @@ jobs: uses: "egor-tensin/setup-clang@v1" - name: "Set up MinGW" if: "${{ matrix.compiler == 'MinGW' }}" - uses: "egor-tensin/setup-mingw@v2" + uses: "e-t-l/setup-mingw@patch-1" with: platform: "x64" - name: "Set up MSVC" diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 5ffb7df..640dd1d 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,15 +1,15 @@ -name: "Run pre-commit" -on: ["pull_request"] +name: "Run Pre-Commit" + +on: + push: + branches: + - "main" jobs: PreCommit: runs-on: "macos-latest" steps: - - uses: "actions/checkout@v3" - - name: "Checkout PR" - run: "gh pr checkout ${{ github.event.pull_request.number }}" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: "actions/checkout@v4" - name: "Install Dependencies" - run: "brew bundle --no-lock" + run: "brew bundle" - uses: "LebJe/pre-commit-composite-action@0.0.1" From b01979a015599269c322611d41478f1c126189c8 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Sun, 31 Dec 2023 23:53:23 -0500 Subject: [PATCH 04/33] Test with MSVC --- .github/workflows/buildAndTest-Windows.yml | 10 ++++++++-- CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index fc13331..a346967 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -7,7 +7,7 @@ jobs: runs-on: "windows-latest" strategy: matrix: - compiler: ["LLVM", "MinGW"] + compiler: ["LLVM", "MinGW", "MSVC"] steps: - uses: "actions/checkout@v4" - name: "Install Dependencies" @@ -37,11 +37,17 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUA_LIBDIR "$(Resolve-Path LuaJIT\bin\)" - if (("${{ matrix.compiler }}" -eq "MinGW") -or ("${{ matrix.compiler }}" -eq "MSVC")) { + if (("${{ matrix.compiler }}" -eq "MinGW")) { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LINK_FLAGS "$(Resolve-Path LuaJIT\bin\lua51.dll)" } + if (("${{ matrix.compiler }}" -eq "MSVC")) + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" + + } else { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" + + } LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make - name: "Run Tests" run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 9695d7b..faae37a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,7 +126,7 @@ set(SOURCES add_library(toml.lua MODULE ${SOURCES}) source_group(src FILES ${SOURCES}) -if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") +if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR MSVC) target_link_options(toml.lua PUBLIC ${PROJECT_SOURCE_DIR}\\libs\\lua51.lib) else() target_link_libraries(toml.lua ${LUA_LIBRARIES} tomlplusplus::tomlplusplus) From 3074fdc628d762ba0b6fd7b618a8045bb5b9ec87 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Sun, 31 Dec 2023 23:56:28 -0500 Subject: [PATCH 05/33] `{` --- .github/workflows/buildAndTest-Windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index a346967..380222a 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -41,7 +41,7 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LINK_FLAGS "$(Resolve-Path LuaJIT\bin\lua51.dll)" } - if (("${{ matrix.compiler }}" -eq "MSVC")) + if (("${{ matrix.compiler }}" -eq "MSVC")) { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { From 663bbaf8a34b7bb0acddfe17fc76b1080005b579 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 00:27:11 -0500 Subject: [PATCH 06/33] test --- .github/workflows/buildAndTest-Windows.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 380222a..10ab206 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -37,17 +37,16 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUA_LIBDIR "$(Resolve-Path LuaJIT\bin\)" - if (("${{ matrix.compiler }}" -eq "MinGW")) { + #if (("${{ matrix.compiler }}" -eq "MinGW")) { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LINK_FLAGS "$(Resolve-Path LuaJIT\bin\lua51.dll)" - } + #} if (("${{ matrix.compiler }}" -eq "MSVC")) { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" - + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" - + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" } + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make - name: "Run Tests" run: | From d8f53da25a09005ab81d070a18494d4d5738fe12 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 00:36:44 -0500 Subject: [PATCH 07/33] A --- .github/workflows/buildAndTest-Windows.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 10ab206..f6c40af 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -37,9 +37,9 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUA_LIBDIR "$(Resolve-Path LuaJIT\bin\)" - #if (("${{ matrix.compiler }}" -eq "MinGW")) { + if (("${{ matrix.compiler }}" -eq "MinGW")) { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LINK_FLAGS "$(Resolve-Path LuaJIT\bin\lua51.dll)" - #} + } if (("${{ matrix.compiler }}" -eq "MSVC")) { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" @@ -47,6 +47,12 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" } + cmake.exe --help + + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" + + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make - name: "Run Tests" run: | From 1d1d5e102b90ed847f186bd7d47a697078412096 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 14:07:15 -0500 Subject: [PATCH 08/33] What if we don't setup-vsdevenv? --- .github/workflows/buildAndTest-Windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index f6c40af..1c3b0fb 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -25,8 +25,8 @@ jobs: with: platform: "x64" - name: "Set up MSVC" - if: "${{ matrix.compiler == 'MSVC' }}" - uses: "seanmiddleditch/gha-setup-vsdevenv@master" + # if: "${{ matrix.compiler == 'MSVC' }}" + # uses: "seanmiddleditch/gha-setup-vsdevenv@master" - name: "Build Project" run: | New-Item -Path "LuaRocks\tree\luaRocksConfig.lua" -ItemType File From 0ee6936ac10e903c76943e55d58c7f10446c4c40 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 14:08:19 -0500 Subject: [PATCH 09/33] B --- .github/workflows/buildAndTest-Windows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 1c3b0fb..c5cbfa8 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -24,9 +24,9 @@ jobs: uses: "e-t-l/setup-mingw@patch-1" with: platform: "x64" - - name: "Set up MSVC" - # if: "${{ matrix.compiler == 'MSVC' }}" - # uses: "seanmiddleditch/gha-setup-vsdevenv@master" + # - name: "Set up MSVC" + # if: "${{ matrix.compiler == 'MSVC' }}" + # uses: "seanmiddleditch/gha-setup-vsdevenv@master" - name: "Build Project" run: | New-Item -Path "LuaRocks\tree\luaRocksConfig.lua" -ItemType File From 24b81d90a5c3b36855c2ef0ec590c0aa8528151e Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 14:27:06 -0500 Subject: [PATCH 10/33] If we set it twice... --- .github/workflows/buildAndTest-Windows.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index c5cbfa8..17ebcbe 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -24,9 +24,9 @@ jobs: uses: "e-t-l/setup-mingw@patch-1" with: platform: "x64" - # - name: "Set up MSVC" - # if: "${{ matrix.compiler == 'MSVC' }}" - # uses: "seanmiddleditch/gha-setup-vsdevenv@master" + - name: "Set up MSVC" + if: "${{ matrix.compiler == 'MSVC' }}" + uses: "seanmiddleditch/gha-setup-vsdevenv@master" - name: "Build Project" run: | New-Item -Path "LuaRocks\tree\luaRocksConfig.lua" -ItemType File @@ -42,6 +42,8 @@ jobs: } if (("${{ matrix.compiler }}" -eq "MSVC")) { + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUA_LIBDIR "$(Resolve-Path LuaJIT\bin\)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUALIB "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" From 64dd11c068534d90c1d871c5adc55fb5bda113f4 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 14:45:43 -0500 Subject: [PATCH 11/33] `"` --- .github/workflows/buildAndTest-Windows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 17ebcbe..d26dfaa 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -35,15 +35,15 @@ jobs: $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUA_LIBDIR "$(Resolve-Path LuaJIT\bin\)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUA_LIBDIR "$(Resolve-Path LuaJIT\bin)" if (("${{ matrix.compiler }}" -eq "MinGW")) { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LINK_FLAGS "$(Resolve-Path LuaJIT\bin\lua51.dll)" } if (("${{ matrix.compiler }}" -eq "MSVC")) { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUA_LIBDIR "$(Resolve-Path LuaJIT\bin\)" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUALIB "lua51.dll" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" From 63d4372866aed2abd49793b7c3b0c8a74591eb6f Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 14:58:39 -0500 Subject: [PATCH 12/33] `compnerd/gha-setup-vsdevenv@main` --- .github/workflows/buildAndTest-Windows.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index d26dfaa..44d7288 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -26,7 +26,7 @@ jobs: platform: "x64" - name: "Set up MSVC" if: "${{ matrix.compiler == 'MSVC' }}" - uses: "seanmiddleditch/gha-setup-vsdevenv@master" + uses: "compnerd/gha-setup-vsdevenv@main" - name: "Build Project" run: | New-Item -Path "LuaRocks\tree\luaRocksConfig.lua" -ItemType File @@ -49,8 +49,6 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" } - cmake.exe --help - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config From 9ff985445b113d5d5c4e2a619cddda75275d1b1f Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 15:02:03 -0500 Subject: [PATCH 13/33] `ilammy/msvc-dev-cmd@v1` --- .github/workflows/buildAndTest-Windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 44d7288..3bb6fe6 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -26,7 +26,7 @@ jobs: platform: "x64" - name: "Set up MSVC" if: "${{ matrix.compiler == 'MSVC' }}" - uses: "compnerd/gha-setup-vsdevenv@main" + uses: "ilammy/msvc-dev-cmd@v1" - name: "Build Project" run: | New-Item -Path "LuaRocks\tree\luaRocksConfig.lua" -ItemType File From 3f4fb01263901e19426666eb06b1bc54972416a2 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 15:06:49 -0500 Subject: [PATCH 14/33] Setup MSVC after configuration --- .github/workflows/buildAndTest-Windows.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 3bb6fe6..4d37430 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -24,10 +24,7 @@ jobs: uses: "e-t-l/setup-mingw@patch-1" with: platform: "x64" - - name: "Set up MSVC" - if: "${{ matrix.compiler == 'MSVC' }}" - uses: "ilammy/msvc-dev-cmd@v1" - - name: "Build Project" + - name: "Configure Project" run: | New-Item -Path "LuaRocks\tree\luaRocksConfig.lua" -ItemType File @@ -52,7 +49,14 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config - + - name: "Set up MSVC" + if: "${{ matrix.compiler == 'MSVC' }}" + uses: "ilammy/msvc-dev-cmd@v1" + - name: "Build Project" + run: | + $env:LUAROCKS_TREE=$(Resolve-Path LuaRocks\tree) + $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) + $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make - name: "Run Tests" run: | From 0a692ef749f0fac6ae041244fcf92ece99669a36 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 15:12:56 -0500 Subject: [PATCH 15/33] C --- .github/workflows/buildAndTest-Windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 4d37430..46447fc 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -39,7 +39,7 @@ jobs: } if (("${{ matrix.compiler }}" -eq "MSVC")) { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT)bin" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { @@ -57,6 +57,7 @@ jobs: $env:LUAROCKS_TREE=$(Resolve-Path LuaRocks\tree) $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make - name: "Run Tests" run: | From c8a359a91e4f7c2309eec16ec45f27abcaa971e5 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 15:43:30 -0500 Subject: [PATCH 16/33] D --- .github/workflows/buildAndTest-Windows.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 46447fc..933e827 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -57,7 +57,9 @@ jobs: $env:LUAROCKS_TREE=$(Resolve-Path LuaRocks\tree) $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make - name: "Run Tests" run: | @@ -67,6 +69,7 @@ jobs: $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" $env:LUA_CPATH="$(Resolve-Path LuaRocks\tree\lib\lua\5.1\)?.dll" $env:LUA_PATH="$(Resolve-Path LuaRocks\tree\share\lua\5.1\)?.lua;$($pwd.Path)\?.lua" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" install luaunit LuaJIT\bin\luajit.exe tests\tests.lua From 53f930a7b519c99d9d36f191a709de570af74548 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 15:59:11 -0500 Subject: [PATCH 17/33] E --- .github/workflows/buildAndTest-Windows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 933e827..9620558 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -51,13 +51,15 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config - name: "Set up MSVC" if: "${{ matrix.compiler == 'MSVC' }}" - uses: "ilammy/msvc-dev-cmd@v1" + uses: "TheMrMilchmann/setup-msvc-dev@v3" - name: "Build Project" run: | $env:LUAROCKS_TREE=$(Resolve-Path LuaRocks\tree) $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT)bin" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make From 796a48faed716fb5d222bcbc62230a19d3fce3cd Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:02:47 -0500 Subject: [PATCH 18/33] F --- .github/workflows/buildAndTest-Windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 9620558..1afbd61 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -52,6 +52,8 @@ jobs: - name: "Set up MSVC" if: "${{ matrix.compiler == 'MSVC' }}" uses: "TheMrMilchmann/setup-msvc-dev@v3" + with: + arch: x64 - name: "Build Project" run: | $env:LUAROCKS_TREE=$(Resolve-Path LuaRocks\tree) From 6633cfc6590e6436e64303c781112ea2d84b642a Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:18:05 -0500 Subject: [PATCH 19/33] Print LuaRocks config --- .github/workflows/buildAndTest-Windows.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 1afbd61..f743471 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -49,6 +49,8 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config + + Get-Content LuaRocks\tree\luaRocksConfig.lua - name: "Set up MSVC" if: "${{ matrix.compiler == 'MSVC' }}" uses: "TheMrMilchmann/setup-msvc-dev@v3" @@ -64,6 +66,7 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config + Get-Content LuaRocks\tree\luaRocksConfig.lua LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make - name: "Run Tests" run: | From 4e88d0bcd72137b66a1870b8fbb5c6920ab2665a Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:25:14 -0500 Subject: [PATCH 20/33] G --- .github/workflows/buildAndTest-Windows.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index f743471..c75e059 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -32,14 +32,14 @@ jobs: $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUA_LIBDIR "$(Resolve-Path LuaJIT\bin)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDI"R "$(Resolve-Path LuaJIT\bin)" if (("${{ matrix.compiler }}" -eq "MinGW")) { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LINK_FLAGS "$(Resolve-Path LuaJIT\bin\lua51.dll)" } if (("${{ matrix.compiler }}" -eq "MSVC")) { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT)bin" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { @@ -62,7 +62,9 @@ jobs: $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT)bin" + Get-Content LuaRocks\tree\luaRocksConfig.lua + + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config From 6a5160c6f8d58c2bcacf44ebd0f4800f6b12b1e8 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:46:52 -0500 Subject: [PATCH 21/33] H --- .github/workflows/buildAndTest-Windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index c75e059..8821835 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -39,7 +39,7 @@ jobs: } if (("${{ matrix.compiler }}" -eq "MSVC")) { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\lua51.dll)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { @@ -64,7 +64,7 @@ jobs: Get-Content LuaRocks\tree\luaRocksConfig.lua - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\lua51.dll)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config From 4b37c7ff66e8b2588ee2dc73f2c6380e2c58527c Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:54:42 -0500 Subject: [PATCH 22/33] I --- .github/workflows/buildAndTest-Windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 8821835..f6c7b54 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -64,8 +64,8 @@ jobs: Get-Content LuaRocks\tree\luaRocksConfig.lua - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\lua51.dll)" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\lua51.lib)" + #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config Get-Content LuaRocks\tree\luaRocksConfig.lua From 37db975422bfe9d3382ccd6777b8d7b4ecc76d83 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:59:51 -0500 Subject: [PATCH 23/33] J --- .github/workflows/buildAndTest-Windows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index f6c7b54..5817461 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -32,15 +32,15 @@ jobs: $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDI"R "$(Resolve-Path LuaJIT\bin)" + #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" if (("${{ matrix.compiler }}" -eq "MinGW")) { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LINK_FLAGS "$(Resolve-Path LuaJIT\bin\lua51.dll)" } if (("${{ matrix.compiler }}" -eq "MSVC")) { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\lua51.dll)" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\lua51.lib)" + #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" From f2c6242c3bcddf04477e77ad29d0d6d11b13787f Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 17:05:44 -0500 Subject: [PATCH 24/33] K --- .github/workflows/buildAndTest-Windows.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 5817461..5eb9b1d 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -39,8 +39,8 @@ jobs: } if (("${{ matrix.compiler }}" -eq "MSVC")) { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\lua51.lib)" - #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\)" + #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.lib" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" @@ -64,8 +64,8 @@ jobs: Get-Content LuaRocks\tree\luaRocksConfig.lua - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\lua51.lib)" - #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.dll" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.lib" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config Get-Content LuaRocks\tree\luaRocksConfig.lua From 9627cc6f401056c69a4ebe748f257b580d41c2cf Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 17:11:14 -0500 Subject: [PATCH 25/33] L --- .github/workflows/buildAndTest-Windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 5eb9b1d..2f17435 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -39,7 +39,7 @@ jobs: } if (("${{ matrix.compiler }}" -eq "MSVC")) { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\lua51.lib)" #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.lib" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { @@ -64,7 +64,7 @@ jobs: Get-Content LuaRocks\tree\luaRocksConfig.lua - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\lua51.lib)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.lib" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config From 0ff43ebb2c1a975df0c306ded5138efc57fa507a Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 17:52:01 -0500 Subject: [PATCH 26/33] M --- .github/workflows/buildAndTest-Windows.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 2f17435..ddac2c2 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -39,7 +39,8 @@ jobs: } if (("${{ matrix.compiler }}" -eq "MSVC")) { - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\lua51.lib)" + Copy-Item "$(Resolve-Path libs\lua51.lib)" -Destination "$(Resolve-Path LuaJIT\bin)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\)" #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.lib" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { @@ -64,7 +65,7 @@ jobs: Get-Content LuaRocks\tree\luaRocksConfig.lua - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path libs\lua51.lib)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.lib" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config From 202f34aaeca8f455ea5468a3031c927d35104cd7 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 18:07:50 -0500 Subject: [PATCH 27/33] N --- .github/workflows/buildAndTest-Windows.yml | 28 +++++++--------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index ddac2c2..a369caf 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -24,6 +24,12 @@ jobs: uses: "e-t-l/setup-mingw@patch-1" with: platform: "x64" + - name: "Set up MSVC" + if: "${{ matrix.compiler == 'MSVC' }}" + uses: "ompnerd/gha-setup-vsdevenv@main" + # uses: "TheMrMilchmann/setup-msvc-dev@v3" + # with: + # arch: x64 - name: "Configure Project" run: | New-Item -Path "LuaRocks\tree\luaRocksConfig.lua" -ItemType File @@ -32,44 +38,26 @@ jobs: $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" - #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" - if (("${{ matrix.compiler }}" -eq "MinGW")) { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LINK_FLAGS "$(Resolve-Path LuaJIT\bin\lua51.dll)" } if (("${{ matrix.compiler }}" -eq "MSVC")) { Copy-Item "$(Resolve-Path libs\lua51.lib)" -Destination "$(Resolve-Path LuaJIT\bin)" + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\)" #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.lib" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config" } - - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" - - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config - - Get-Content LuaRocks\tree\luaRocksConfig.lua - - name: "Set up MSVC" - if: "${{ matrix.compiler == 'MSVC' }}" - uses: "TheMrMilchmann/setup-msvc-dev@v3" - with: - arch: x64 - name: "Build Project" run: | $env:LUAROCKS_TREE=$(Resolve-Path LuaRocks\tree) $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" - Get-Content LuaRocks\tree\luaRocksConfig.lua - - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\)" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.lib" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" - LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config - Get-Content LuaRocks\tree\luaRocksConfig.lua LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make - name: "Run Tests" run: | From a2cb2d8000d13cd2cf2c1300b1ad539726504fd1 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 18:11:25 -0500 Subject: [PATCH 28/33] O Skip tests for now --- .github/workflows/buildAndTest-Windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index a369caf..2fd0e8b 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -26,7 +26,7 @@ jobs: platform: "x64" - name: "Set up MSVC" if: "${{ matrix.compiler == 'MSVC' }}" - uses: "ompnerd/gha-setup-vsdevenv@main" + uses: "compnerd/gha-setup-vsdevenv@main" # uses: "TheMrMilchmann/setup-msvc-dev@v3" # with: # arch: x64 @@ -70,4 +70,4 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" install luaunit - LuaJIT\bin\luajit.exe tests\tests.lua + #LuaJIT\bin\luajit.exe tests\tests.lua From 4ad9c74c5d045f18eb19e4d1a139a26d53710555 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 18:23:09 -0500 Subject: [PATCH 29/33] P --- .github/workflows/buildAndTest-Windows.yml | 6 ++++-- README.md | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 2fd0e8b..3a53f7d 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -69,5 +69,7 @@ jobs: $env:LUA_PATH="$(Resolve-Path LuaRocks\tree\share\lua\5.1\)?.lua;$($pwd.Path)\?.lua" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" install luaunit - - #LuaJIT\bin\luajit.exe tests\tests.lua + + if (("${{ matrix.compiler }}" -not "MSVC")) { + LuaJIT\bin\luajit.exe tests\tests.lua + } diff --git a/README.md b/README.md index 2641091..f1495ec 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc) ### Requirements -- A C++ 17 compiler +- A C++ 17 compiler (Clang, GCC, MinGW) - [CMake](https://cmake.org) - Lua C headers (`lua.h`, `lualib.h`, and `lauxlib.h`) - Lua library (e.g. `liblua51.`) @@ -74,7 +74,7 @@ luarocks install toml ##### LLVM -If you have installed Clang, and CMake is configured to use it, you can run: +If you have installed Clang (), and CMake is configured to use it, you can run: ```powershell luarocks install toml @@ -82,7 +82,7 @@ luarocks install toml ##### MinGW -If you have installed MinGW, and CMake is configured to use it, you can run: +If you have installed [MinGW](https://www.mingw-w64.org/), and CMake is configured to use it, you can run: ```powershell luarocks config variables.LINK_FLAGS "path\to\LuaJIT\bin\lua51.dll" From f547e14172148298ad6a271931a86c9c5344db81 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Mon, 1 Jan 2024 18:31:47 -0500 Subject: [PATCH 30/33] Q --- .github/workflows/buildAndTest-Windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 3a53f7d..97928e7 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -70,6 +70,6 @@ jobs: LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" install luaunit - if (("${{ matrix.compiler }}" -not "MSVC")) { + if (("${{ matrix.compiler }}" -ne "MSVC")) { LuaJIT\bin\luajit.exe tests\tests.lua } From a60daa207bb30b9882b02c02af01aa43ca9d2f73 Mon Sep 17 00:00:00 2001 From: Jeff L <51171427+LebJe@users.noreply.github.com> Date: Tue, 2 Jan 2024 11:36:43 -0500 Subject: [PATCH 31/33] Cleanup --- .github/workflows/buildAndTest-Windows.yml | 4 ---- CHANGELOG.md | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 97928e7..58c8612 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -27,9 +27,6 @@ jobs: - name: "Set up MSVC" if: "${{ matrix.compiler == 'MSVC' }}" uses: "compnerd/gha-setup-vsdevenv@main" - # uses: "TheMrMilchmann/setup-msvc-dev@v3" - # with: - # arch: x64 - name: "Configure Project" run: | New-Item -Path "LuaRocks\tree\luaRocksConfig.lua" -ItemType File @@ -46,7 +43,6 @@ jobs: Copy-Item "$(Resolve-Path libs\lua51.lib)" -Destination "$(Resolve-Path LuaJIT\bin)" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\)" - #LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUALIB" "lua51.lib" LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022" } else { LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)" diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e727d6..4f4a45f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.4.0](https://github.com/LebJe/toml.lua/releases/tag/0.4.0) - 2023-12-31 +## [0.4.0](https://github.com/LebJe/toml.lua/releases/tag/0.4.0) - 2024-01-02 ### Added @@ -27,6 +27,9 @@ int3 = 0x169F ``` - `formattedIntsAsUserdata` can be passed to the options table of `toml.decode` (see "Decoding Options" in the README). + - Updated to toml++ v3.4.0. + - Updated to MagicEnum v0.9.5. + - toml.lua compiles with MSVC. ## [0.3.0](https://github.com/LebJe/toml.lua/releases/tag/0.3.0) - 2023-02-19 From ed7a4c530ef7e03f1f44c46b1ccac4280daf722b Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Tue, 2 Jan 2024 11:53:00 -0500 Subject: [PATCH 32/33] Run Pre-Commit --- .github/workflows/buildAndTest-Windows.yml | 6 +++--- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index 58c8612..b9af0bd 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -53,7 +53,7 @@ jobs: $env:LUAROCKS_TREE=$(Resolve-Path LuaRocks\tree) $env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\) $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" - + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make - name: "Run Tests" run: | @@ -63,9 +63,9 @@ jobs: $env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)" $env:LUA_CPATH="$(Resolve-Path LuaRocks\tree\lib\lua\5.1\)?.dll" $env:LUA_PATH="$(Resolve-Path LuaRocks\tree\share\lua\5.1\)?.lua;$($pwd.Path)\?.lua" - + LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" install luaunit - + if (("${{ matrix.compiler }}" -ne "MSVC")) { LuaJIT\bin\luajit.exe tests\tests.lua } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 63b92ca..3dbeba5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: "https://github.com/pre-commit/mirrors-prettier.git" - rev: "v2.4.1" + rev: "v4.0.0-alpha.8" hooks: - id: "prettier" name: "Format YAML & Markdown" diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f4a45f..7ec7729 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,9 +27,9 @@ int3 = 0x169F ``` - `formattedIntsAsUserdata` can be passed to the options table of `toml.decode` (see "Decoding Options" in the README). - - Updated to toml++ v3.4.0. - - Updated to MagicEnum v0.9.5. - - toml.lua compiles with MSVC. +- Updated to toml++ v3.4.0. +- Updated to MagicEnum v0.9.5. +- toml.lua compiles with MSVC. ## [0.3.0](https://github.com/LebJe/toml.lua/releases/tag/0.3.0) - 2023-02-19 From 57c717f3deb7570fa25ad117eadec2201365cb24 Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Tue, 2 Jan 2024 12:00:36 -0500 Subject: [PATCH 33/33] Update TOC --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f1495ec..ef48d53 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ toml.lua is a [Lua](https://www.lua.org) wrapper around [toml++](https://github. - [Decoding](#decoding) - [Decoding Options](#decoding-options) - [temporalTypesAsUserData](#temporaltypesasuserdata) + - [formattedIntsAsUserData](#formattedintsasuserdata) - [Encoding](#encoding) - [Error Handling](#error-handling) - [Inline Tables](#inline-tables) @@ -46,7 +47,8 @@ toml.lua is a [Lua](https://www.lua.org) wrapper around [toml++](https://github. - [Licenses](#licenses) - [Contributing](#contributing) - + +