- Attach permission checks to the first argument (so the literal
command name) rather than the last argument. This fixes commands
showing up when they shouldn't.
- HelpingArgumentBuilder now inherits permissions of its leaf nodes.
This only really impacts the "track" subcommand.
- Don't autocomplete the computer selector for the "queue" subcommand.
As everyone has permission for this command, it's possible to find
all computer ids and labels in the world.
I'm in mixed minds about this, but don't think this is an exploit -
computer ids/labels are sent to in-range players so shouldn't be
considered secret - but worth patching none-the-less.
- Improve REPL's handling of expressions
(655d5aeca8)
- Some tiny optimisations to the window API
(4accda6b8e)
- Be lazy in reporting errors in the lexer
(54ab98473f)
- Update lua.lua require logic.
(88f0c44152)
- Fix GPS returning nan on duplicate positions.
- Distinguish between all parsers passing and failing.
- Improve several comma related parse errors.
- Ignore metatables in textutils.serialize.
- Detect common audio containers in "speaker".
Co-authored-by: Wojbie <Wojbie@gmail.com>
Given an input like f(x), which is both a valid statement and
expression, both parsers would accept the whole input. However, this was
treated the same as both parsers rejecting the input, resulting in a
crash when trying to print the error.
We now return immediately when any parser accepts the input.
Fixes#1354
The main purpose of this is to backport the improved parse/runtime
errors to older versions. I think they're sufficiently useful that we
should try to make it as widely available as possible.
We've been running them for a week now on SC3 and the released version
and not seen any issues, so I think it's probably stable enough.
This is a pretty lazy commit: I ended up copying the whole ROM over and
then picking up a few other related changes along the way.
- Trim spaces from file paths (b8fce1eecc)
- Correctly format 12AM/PM with
%I (9f48395596)
- Fix http.request and htpt.websocketAsync not handling a few failure
edge-cases correctly (3b42f22a4f).
- Move the internal modules into the main package path, hidden under
cc.internal (34a31abd9c).
- Gather code coverage in Java instead of
Lua (28a55349a9).
- Make error messages in edit more
obvious (8cfbfe7ceb).
- Make mcfly's test methods global. This means we don't need to pass
stub everywhere (7335a892b5).
- Improve runtime and parse errors. This comes from numerous commits,
but chiefly a12b405acf, and
5502412181.
- Hide the internal redirect methods in
multishell (33b6f38339).
Note this does /not/ include the shebang changes (sorry Emma!). I've
tried to avoid adding any user-controllable features, mostly because I
don't know how to handle the versioning otherwise :).
- Switch to using OptionalInt/OptionalLong instead of @Nullable
Long/Integers. I know IntelliJ complains, but it avoids the risk of
implicit unboxing.
- Instead of mutating PartialOptions, we now define a merge() function
which returns the new options. This simplifies the logic in
AddressRule a whole bunch.
I still don't really understand why the ROOT locale is wrong here, but
there we go. We'll need to remember to uncomment the tests on the 1.18
branch!
Also add some code to map tests back to their definition side. Alas,
this only links to the file right now, not the correct line :/.
This offers very few advantages now, but helps support the following in
the future:
- Reuse test support code across multiple projects (useful for
multi-loader).
- Allow using test fixture code in testMod. We've got a version of our
gametest which use Kotlin instead of Lua for asserting computer
behaviour.
We can't use java-test-fixtures here for Forge reasons, so have to roll
our own version. Alas.
- Add an ILuaMachine implementation which runs Kotlin coroutines
instead. We can use this for testing asynchronous APIs. This also
replaces the FakeComputerManager.
- Move most things in the .support module to .test.core. We need to use
a separate package in order to cope with Java 9 modules (again,
thanks Forge).
This allows other mods to create wired-modem alike blocks, which expose
peripherals on the wired network, without having to reimplement the main
modem interface.
This is not currently documented, but a peripheral_hub should provide
the following methods:
- isPresentRemote
- getTypeRemote
- hasTypeRemote
- getMethodsRemote
- callRemote
- Add a new file_transfer event. This has the signature
"file_transfer", TransferredFiles.
TransferredFiles has a single method getFiles(), which returns a list
of all transferred files.
- Add a new "import" program which waits for a file_transfer event and
writes files to the current directory.
- If a file_transfer event is not handled (i.e. its getFiles() method
is not called) within 5 seconds on the client, we display a toast
informing the user on how to upload a file.
- Use <p> everywhere. This is uglier, but also technically more
correct. This requires a version bump to cct-javadoc, and will give
me a massive headache when merging.
- Link against the existing OpenJDK docs.
We now wait for workers to terminate when closing the computer thread.
I'll be honest, I'm not happy with this code. Multi-threading is really
hard to get right, and I can't say I'm convinced this is especially well
behaved. I did look at trying to model this in TLA+, but in the end
decided it wasn't worth it.
In the future we probably want to split ComputerExecutor into two
objects, where one is our entry in the ComputerThread queue (and so
holds timing information) while the other is responsible for actual
execution.
- Correctly handle Git commands failing. We need an actual default
value, not just null!
- Use run/ and build/tmp/ for temporary test locations, not
/test-files.
- Switch over to the Gradle GH action. Not expecting massive changes,
but might provide some better caching.
- Bump some GH action versions.
- Fix a Java 8 compatability issue in our build scripts.
- Add a new Node plugin. This automatically installs npm dependencies
and provides a "NpxExecToDir" to dir task. This allows us to make the
doc website task dependencies a little nicer, by simply chaining
tasks together, rather than doing dependsOn + `input.files(the other
task output)`.
- Switch over to CurseForgeGradle from CurseGradle. The latter is
super clunky to use in non-Groovy languages.
- Copy our Modrinth description body to our repo, and add support for
syncing it. We'll still have to do CF manually I think.