rojo-rbx / run-in-roblox Goto Github PK
View Code? Open in Web Editor NEWRun a place, model, or individual script inside Roblox Studio, integrating with command line tools
License: MIT License
Run a place, model, or individual script inside Roblox Studio, integrating with command line tools
License: MIT License
So I have an idea about how we could communicate the output from studio to the command line where run-in-roblox was called.
The idea would be that run-in-roblox would add a "master" script to the given roblox place. This script could connect to the MessageOut
event or use GetLogHistory
to retrieve the output, send it to the server and print it back in the terminal.
Currently, run-in-roblox uses LogService.MessageOut
and will set the exit code to 1 if the messageType == Enum.MessageType.MessageError
. However, occasionally Studio will report internal Roblox errors like "Studio beta features failed to fetch". This will cause run-in-roblox to exit with a status code of 1 even if none of the user code had an error.
Instead, maybe run-in-roblox should use ScriptContext.Error
to determine the status code and continue to use LogService.MessageOut
for logging. ScriptContext.Error
provides a reference to the script that errored.
We can probably safely ignore any script errors from outside common services like:
I was having issues with the following error whenever I attempted to run run-in-roblox:
PS S:\Projects\ProjectVampire\main> F:\justi\run-in-roblox-0.3.0-win64\run-in-roblox.exe --place ./test.rbxl --script ./ci.lua > ./test-out.txt
thread '<unnamed>' panicked at 'error binding to 127.0.0.1:50312: error creating server listener: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)', C:\Users\runneradmin.cargo\registry\src\github.com-1ecc6299db9ec823\hyper-0.12.35\src\server\mod.rs:116:17
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread '<unnamed>' panicked at 'called Result::unwrap() on an Err value: Timeout reached while waiting for Roblox Studio to come online', src/main.rs:75:9
[ERROR run_in_roblox] receiving on a closed channel
Someone in the open-source discord server suggested I recompile with a different port and then it started running. Their reasoning was that the port may conflict with a Windows 11 port. So I thought I would open a issue here about it for anyone else having this problem :).
Roblox Studio allows for configuring custom directories to load local plugins from. At the moment this breaks run-in-roblox due to #13 .
Run-in-Roblox failed while apparently giving a clean exit code during CI setup when running the command run-in-roblox --place build.rbxlx --script Tests/Run.server.lua
.
Unfortunately I cannot reproduce this. Rerunning the job resulted in expected behavior. If I encounter it again I'll leave more details.
One problem I discovered when we rely on the LogService.MessageOut to send data from Studio to the server is that the string passed to MessageOut is sometimes filtered (for example some urls gets truncated).
One thing we could do is change the main template for something like
return function(sender)
...
end
And then, sender could be a function that will json encode the content and send it directly through the server.
When using run-in-roblox in a windows-latest
GitHub Action I get the error Timeout reached while waiting for Roblox Studio to come online
. This happens 100% of the time in the action but I am not able to reproduce it locally.
I am running run-in-roblox
with a .rbxl
file that is 17MB in size. The following is the relevent part of my workflow YML:
- name: Install Roblox Studio
uses: OrbitalOwen/[email protected]
with:
cookie: ${{ secrets.ROBLOSECURITY }}
token: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 2
- name: Run unit tests with run-in-roblox
run: npm test
The npm test
command is run-in-roblox --place game.rbxl --script ci-scripts/unit-testing.lua
.
Steps to reproduce bug:
I've set the timeout while waiting for Roblox Studio to 60 seconds. It might be useful to configure this on slower or flakier machines.
It would be good to have the ability to run the script in a specific place as it may also include assets that the plugin may want.
Documentation/read me states that the CLI takes one required argument (--script) and an optional argument (--place) but this is not the case. Both arguments must be present to run run-in-roblox.
The new studio output window features that print({ value = 1 })
is visualised, instead of being outputted as table: hex ID
. However, run-in-roblox does not detect this at all, acting as if nothing was printed.
This also applies to print(Instance.new("TextLabel"))
Some projects like rbx-dom need to send a more complicated script to run inside the place. Instead of generating the place with all of that code, it would be useful to generate a model whose top-level instance is a ModuleScript
and have run-in-roblox execute that script.
Alternatively, we could have the run-in-roblox runtime search the model for all Script
instances and run them?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.