Release Notes for 592

i see, thank you for the clarification I appreciate it.

1 Like

The 200,000 character removal would be amazing for many plugin-based workflows.

I tried testing this by creating a plugin with the following code:

local ScriptEditorService = game:GetService("ScriptEditorService")
local ServerScriptService = game:GetService("ServerScriptService")

local script = Instance.new("Script")
script.Name = "Test Script"
script.Parent = ServerScriptService

ScriptEditorService:UpdateSourceAsync(script, function()
	return string.rep("a", 300000)
end)

ScriptEditorService:OpenScriptDocumentAsync(script)

I get the error “This API is unavailable” - I’m on 592 but it seems like it hasn’t rolled out to me yet. Maybe someone will be in a test group or an earlier config rollout shard and can test this successfully right now.

Overall, fantastic work Roblox team! This is the most exciting update for me in a long while. I particularly like

  • Fixes incorrect path returned by pathfinding with few waypoints having Y=0. I hope this is the issue where on terrain pathfinding waypoints would appear underground. This was moderately annoying and required raycasting pathfinding waypoints to the terrain ground.
  • Fixes an issue where some text in the microprofiler displays incorrectly. - ran into this a bunch which gets confusing as the labels are wrong or duplicated on some intervals.
  • Fixes "cannot resume dead coroutine" error coming from cancelled threads that were suspended on Wait/WaitForChild call. - yay, no more spurious errors from this!
3 Likes
FFlagUpdateSourceAsync
3 Likes

This may be unrelated question, but does updating the source to a function run the script? or does it set the function contents to thread contents.

It’s not that well documented, but I think the return value of the callback should be a string, and that is the contents of the script.

then that kind of defeats the purpose imo, I was hoping for something similar to task.spawn, which creates a thread from a function. only difference being here that it creates a LuaSourceContainer

I haven’t got around to testing it just yet but I’m pretty sure its similar behaviour to DataStore:UpdateAsync

func: (oldSrc: string) -> string?

1 Like

Yes, it’s like DataStore UpdateAsync.

It provides a way to update the source of a script which is guaranteed to not conflict with other edits being applied by people typing into the script locally or other edits coming it from across the network in Team Create and other scenarios. The idea is that most scripts aren’t constantly being edited, so even if it fails the first or second run it’s likely to succeed shortly thereafter.

For example, it makes it trivial (or at least much easier) to correctly write a custom find-and-replace-in-all-scripts implementation.

4 Likes

Ah that makes sense. Nice job on adding team create compatibility. But will we ever be able to make the script source a function? It’s really annoying and takes so much effort to make a table in script thru a plugin.


Now this is pretty cool. It solves a bunch of edge cases that emerged with the Deferred event mode.

1 Like

Now, we need a reconnect function to go with that lol…

1 Like

Yeah, it’s quite sad that the connection signal is just wasted after you use it. You can’t set Connected to true either.

2 Likes

Does connection:Destroy actual destroy the connection or is it the exact same as a disconnect?

Could just destroy the connect then remake it when you want to, maybe I don’t know.

1 Like

You cannot destroy a connection.

1 Like

Isn’t that what the connection:Destory() part thing is for in the release notes?

Connections don’t have a Destroy method. It must be a typo.

Wonder what Roblox meant then.

I don’t think you’ve seen what weird “updates” are shown sometimes.

You don’t need a method to reconnect an event. Just store the function as a local and call :Connect again.

cc @SubtotalAnt8185

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.