Skip to content

Commit bcda37a

Browse files
committed
Remove debugging statements & old code
Update to luarocks 3.11 in CI
1 parent ffc000e commit bcda37a

File tree

3 files changed

+8
-47
lines changed

3 files changed

+8
-47
lines changed

scripts/buildLuaRocks.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

33
sudo apt install build-essential libreadline-dev unzip wget
4-
wget https://luarocks.org/releases/luarocks-3.8.0.tar.gz
5-
tar -zxpf luarocks-3.8.0.tar.gz
6-
rm luarocks-3.8.0.tar.gz
7-
cd luarocks-3.8.0
4+
wget https://luarocks.org/releases/luarocks-3.11.0.tar.gz
5+
tar -zxpf luarocks-3.811.0.tar.gz
6+
rm luarocks-3.11.0.tar.gz
7+
cd luarocks-3.11.0
88
./configure
99
make
1010
sudo make install

scripts/installLuaRocks.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ if (-not (Test-Path -Path $installDir)) {
99

1010
$installDir = Resolve-Path $installDir
1111

12-
Invoke-WebRequest -Uri "http://luarocks.github.io/luarocks/releases/luarocks-3.8.0-windows-32.zip" -OutFile "luarocks.zip"
12+
Invoke-WebRequest -Uri "http://luarocks.github.io/luarocks/releases/luarocks-3.11.0-windows-32.zip" -OutFile "luarocks.zip"
1313
Expand-Archive -Path "luarocks.zip" -DestinationPath "."
14-
Move-Item -Path "luarocks-3.8.0-windows-32\luarocks.exe" -Destination "$($installDir)"
15-
Move-Item -Path "luarocks-3.8.0-windows-32\luarocks-admin.exe" -Destination "$($installDir)"
14+
Move-Item -Path "luarocks-3.11.0-windows-32\luarocks.exe" -Destination "$($installDir)"
15+
Move-Item -Path "luarocks-3.11.0-windows-32\luarocks-admin.exe" -Destination "$($installDir)"
1616

1717
Remove-Item "luarocks.zip"
18-
Remove-Item -Recurse -Force "luarocks-3.8.0-windows-32"
18+
Remove-Item -Recurse -Force "luarocks-3.11.0-windows-32"

src/utilities/utilities.cpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -93,26 +93,6 @@ inline toml::format_flags defaultFormatFlags() {
9393
return flags;
9494
}
9595

96-
// void addFlag(toml::format_flags & flags, sol::table & flagsTable, toml::format_flags flagToAdd) {
97-
// auto tableFlag = flagsTable[camelCase(magic_enum::enum_name(flagToAdd))];
98-
99-
// std::cout << "addFlag: \nenum_name: " << magic_enum::enum_name(flagToAdd) << "\n";
100-
101-
// std::cout << "camel case name: " << camelCase(magic_enum::enum_name(flagToAdd)) << "\n";
102-
103-
// if (tableFlag.valid()) {
104-
// std::cout << "Is valid: " << camelCase(magic_enum::enum_name(flagToAdd)) << "\n";
105-
// if (tableFlag.get<bool>()) {
106-
// flags |= flagToAdd;
107-
// }
108-
// } else {
109-
// // Use default
110-
// if (defaultFlags[flagToAdd]) {
111-
// flags |= flagToAdd;
112-
// }
113-
// };
114-
// }
115-
11696
toml::format_flags tableToFormatFlags(sol::optional<sol::table> t) {
11797
auto flags = format_flags::none;
11898

@@ -127,9 +107,6 @@ toml::format_flags tableToFormatFlags(sol::optional<sol::table> t) {
127107
// User passed an empty table to clear all flags.
128108
if (table.empty()) return flags;
129109

130-
// Set default flags, and allow user to override
131-
//flags = defaultFormatFlags();
132-
133110
// Set default flags, and allow user to override
134111
std::map<format_flags, bool> userFlags = defaultFlags;
135112

@@ -145,26 +122,10 @@ toml::format_flags tableToFormatFlags(sol::optional<sol::table> t) {
145122
userFlags[toml::format_flags::indentation] = table["indentation"].get<bool>();
146123
}
147124

148-
std::cout << "UserFlags:\n";
149-
150-
for (auto [flag, enabled] : userFlags) {
151-
std::cout << "Flag: " << magic_enum::enum_name(flag) << ", Enabled: " << (enabled ? "True" : "False") << "\n";
152-
}
153-
154125
for (auto [flag, enabled] : userFlags) {
155126
if (enabled) flags |= flag;
156127
}
157128

158-
// constexpr auto f = magic_enum::enum_values<format_flags>();
159-
// for (auto flag : f) {
160-
// addFlag(flags, table, flag);
161-
// }
162-
163-
// // `format_flags::indentation` is not returned from `enum_values`, so we must handle it separately.
164-
// if (table["indentation"].valid()) {
165-
// flags |= toml::format_flags::indentation;
166-
// }
167-
168129
return flags;
169130
}
170131

0 commit comments

Comments
 (0)