Skip to content

Commit 1a9b2a5

Browse files
authored
0.4.0 (#10)
* Add support for formatted integers * Update README and CHANGELOG * Update tests * Update MagicEnum & Toml++ * Test both `decodeFromFile` and `decode` in `testInvalidInputs`. * Update workflows * Build with MSVC * Run Pre-Commit * Update TOC
1 parent 9ac034b commit 1a9b2a5

23 files changed

+346
-131
lines changed
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
2+
name: "Bug report"
3+
about: "Create a report to help us improve"
4+
title: ""
55
labels: bug
66
assignees: LebJe
7-
87
---
98

109
## Describe the bug
10+
1111
A clear and concise description of what the bug is.
1212

1313
## Version and Installation Info
14-
* toml.lua version:
15-
* Installation method: (Manual compilation or `luarocks install toml`)
16-
* Compilation log, or Luarocks installation log:
14+
15+
- toml.lua version:
16+
- Operating system:
17+
- Installation method: (Manual compilation or `luarocks install toml`)
18+
- Compilation log, or Luarocks installation log:
19+
1720
```shell
18-
# For compilation logs, include the compilation command, and compiler version
21+
# Paste installation or compilation log here
22+
# For compilation logs, include the compilation command, and compiler version
1923
```
2024

2125
## To Reproduce
26+
2227
Provide a **minimal** TOML file that demonstrates the issue:
2328

2429
```toml
@@ -33,7 +38,9 @@ local toml = require("toml")
3338
```
3439

3540
## Expected behavior
41+
3642
A clear and concise description of what you expected to happen.
3743

3844
## Additional context
45+
3946
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
2+
name: "Feature request"
3+
about: "Suggest an idea for this project"
4+
title: ""
5+
labels: ""
66
assignees: LebJe
7-
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/workflows/buildAndTest-Linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
"liblua5.1-0-dev lua5.1",
1717
]
1818
steps:
19-
- uses: "actions/checkout@v3"
19+
- uses: "actions/checkout@v4"
2020
- name: "Add Dependencies"
2121
run: |
2222
export COMPILER=${{ matrix.compiler }}

.github/workflows/buildAndTest-MacOS.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
matrix:
1010
lua: ["lua", "luajit"]
1111
steps:
12-
- uses: "actions/checkout@v3"
12+
- uses: "actions/checkout@v4"
1313
- name: "Install Dependencies"
1414
run: |
1515
brew install ${{ matrix.lua }} luarocks

.github/workflows/buildAndTest-Windows.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
runs-on: "windows-latest"
88
strategy:
99
matrix:
10-
compiler: ["LLVM", "MinGW"]
10+
compiler: ["LLVM", "MinGW", "MSVC"]
1111
steps:
12-
- uses: "actions/checkout@v3"
12+
- uses: "actions/checkout@v4"
1313
- name: "Install Dependencies"
1414
run: "choco install -y cmake ninja"
1515
- name: "Build LuaJIT"
@@ -21,27 +21,39 @@ jobs:
2121
uses: "egor-tensin/setup-clang@v1"
2222
- name: "Set up MinGW"
2323
if: "${{ matrix.compiler == 'MinGW' }}"
24-
uses: "egor-tensin/setup-mingw@v2"
24+
uses: "e-t-l/setup-mingw@patch-1"
2525
with:
2626
platform: "x64"
2727
- name: "Set up MSVC"
2828
if: "${{ matrix.compiler == 'MSVC' }}"
29-
uses: "seanmiddleditch/gha-setup-vsdevenv@master"
30-
- name: "Build Project"
29+
uses: "compnerd/gha-setup-vsdevenv@main"
30+
- name: "Configure Project"
3131
run: |
3232
New-Item -Path "LuaRocks\tree\luaRocksConfig.lua" -ItemType File
3333
3434
$env:LUAROCKS_TREE=$(Resolve-Path LuaRocks\tree)
3535
$env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\)
3636
$env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)"
3737
38-
LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LUA_LIBDIR "$(Resolve-Path LuaJIT\bin\)"
39-
40-
if (("${{ matrix.compiler }}" -eq "MinGW") -or ("${{ matrix.compiler }}" -eq "MSVC")) {
38+
if (("${{ matrix.compiler }}" -eq "MinGW")) {
4139
LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config variables.LINK_FLAGS "$(Resolve-Path LuaJIT\bin\lua51.dll)"
4240
}
4341
44-
LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config"
42+
if (("${{ matrix.compiler }}" -eq "MSVC")) {
43+
Copy-Item "$(Resolve-Path libs\lua51.lib)" -Destination "$(Resolve-Path LuaJIT\bin)"
44+
45+
LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin\)"
46+
LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Visual Studio 17 2022"
47+
} else {
48+
LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config "variables.LUA_LIBDIR" "$(Resolve-Path LuaJIT\bin)"
49+
LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" config cmake_generator "Ninja Multi-Config"
50+
}
51+
- name: "Build Project"
52+
run: |
53+
$env:LUAROCKS_TREE=$(Resolve-Path LuaRocks\tree)
54+
$env:LUAROCKS_LUADIR=$(Resolve-Path LuaJIT\)
55+
$env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)"
56+
4557
LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" make
4658
- name: "Run Tests"
4759
run: |
@@ -51,6 +63,9 @@ jobs:
5163
$env:LUAROCKS_CONFIG="$(Resolve-Path LuaRocks\tree\luaRocksConfig.lua)"
5264
$env:LUA_CPATH="$(Resolve-Path LuaRocks\tree\lib\lua\5.1\)?.dll"
5365
$env:LUA_PATH="$(Resolve-Path LuaRocks\tree\share\lua\5.1\)?.lua;$($pwd.Path)\?.lua"
66+
5467
LuaRocks\luarocks.exe --lua-dir "$($env:LUAROCKS_LUADIR)" --tree "$($env:LUAROCKS_TREE)" install luaunit
5568
56-
LuaJIT\bin\luajit.exe tests\tests.lua
69+
if (("${{ matrix.compiler }}" -ne "MSVC")) {
70+
LuaJIT\bin\luajit.exe tests\tests.lua
71+
}

.github/workflows/pre-commit.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
name: "Run pre-commit"
2-
on: ["pull_request"]
1+
name: "Run Pre-Commit"
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
37

48
jobs:
59
PreCommit:
610
runs-on: "macos-latest"
711
steps:
8-
- uses: "actions/checkout@v3"
9-
- name: "Checkout PR"
10-
run: "gh pr checkout ${{ github.event.pull_request.number }}"
11-
env:
12-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
- uses: "actions/checkout@v4"
1313
- name: "Install Dependencies"
14-
run: "brew bundle --no-lock"
14+
run: "brew bundle"
1515
- uses: "LebJe/pre-commit-composite-action@0.0.1"

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ compile_commands.json
1010
Brewfile.lock.json
1111
.vscode/
1212
.nova/
13-
.vim/
13+
.vim/
14+
15+
# Test files
16+
test.lua
17+
inspect.lua

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: "https://github.com/pre-commit/mirrors-prettier.git"
5-
rev: "v2.4.1"
5+
rev: "v4.0.0-alpha.8"
66
hooks:
77
- id: "prettier"
88
name: "Format YAML & Markdown"

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 4,
4+
"singleQuote": false,
5+
"useTabs": true
6+
}

.prettierrc.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)