Skip to content

Commit

Permalink
LUAFDN-280: inspect should print function names and use __tostring me…
Browse files Browse the repository at this point in the history
…tamethod, if either are available (#63)

* Add tests and implementation to inspect so it will emit function names (when possible) and use the __tostring metamethod if available on a table
* Align .gitignore with other repos
* Run selene on subset of the tree that is clean. Expand its use later.
* Use the Quiet reporter so that debugging is easier.
* Run stylua on subset of tree. Reformat new files.
* Add Promise dev dependency so we can make sure the inspect output is reasonable.
  • Loading branch information
RoFlection Bot committed Jul 17, 2021
1 parent caeeb47 commit 10dcf89
Show file tree
Hide file tree
Showing 11 changed files with 10,562 additions and 72 deletions.
32 changes: 23 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
# Rbxm model files
/*.rbxmx

# Dependencies
Packages/*
!Packages/.robloxrc

# Rotriever lockfile
rotriever.lock
# Libraries don't commit lockfiles, apps do
rotriever.lock

# Dependencies
Packages/*
!Packages/.robloxrc
!Packages/_Workspace/
Packages/_Workspace/*
!Packages/_Workspace/.robloxrc

# Rbxm model files
**/*.rbx[lm]*

# Misc OS files
.DS_Store

# Local IDE settings
.vscode
.idea/

# Code coverage data files
**/luacov.*
**/lcov*.info
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# LuauPolyfills Changelog

# Unreleased

### Fixes
* `util.inspect` will now emit function names, and use the __tostring metamethod, when printing values, if either are available

# 0.2.0

### Changes
Expand Down
2 changes: 2 additions & 0 deletions bin/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ find Packages/Dev -name "*.robloxrc" | xargs rm -f
find Packages/_Index -name "*.robloxrc" | xargs rm -f
echo "Run static analysis"
roblox-cli analyze test-model.project.json
selene src/util
stylua -c src/util
echo "Run tests in DEV"
roblox-cli run --load.model model.rbxmx --run bin/spec.lua --fastFlags.overrides "UseDateTimeType3=true" --lua.globals=__DEV__=true
echo "Run tests in release"
Expand Down
2 changes: 1 addition & 1 deletion bin/spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local JestRoblox = require(Root.Packages.Dev.JestRoblox)
-- Run all tests, collect results, and report to stdout.
local result = JestRoblox.TestBootstrap:run(
{ Packages.LuauPolyfill },
JestRoblox.Reporters.TextReporter
JestRoblox.Reporters.TextReporterQuiet
)

if result.failureCount == 0 and #result.errors == 0 then
Expand Down
4 changes: 3 additions & 1 deletion foreman.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[tools]
rotrieve = { source = "roblox/rotriever", version = "0.4.2" }
rojo = { source = "rojo-rbx/rojo", version = "6.0.0-rc.1" }
rojo = { source = "rojo-rbx/rojo", version = "6.2.0" }
selene = { source = "Kampfkarren/selene", version = "0.13" }
stylua = { source = "JohnnyMorganz/StyLua", version = "0.10" }
Loading

0 comments on commit 10dcf89

Please sign in to comment.