Quenty / Quenty/NevermoreEngine
Switch to Evaera's 'roblox-lua-promise'
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 610
- Forks
- 144
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 12
Description
This could be a complete nightmare, but would be a great help in making these libraries more user friendly. The upcoming v4 release fixes all of the weird quirks, so it should be ready enough to use...
A lot of the fixes are smallish syntax things, i.e.
-- Quenty promises
function HumanoidTracker:PromiseNextHumanoid()
if self.Humanoid.Value then
return Promise.resolved(self.Humanoid.Value)
end
if self._maid._nextHumanoidPromise then
return self._maid._nextHumanoidPromise
end
local promise = Promise.new()
local conn = self.Humanoid.Changed:Connect(function(newValue)
if newValue then
promise:Resolve(newValue)
end
end)
promise:Finally(function()
conn:Disconnect()
end)
self._maid._nextHumanoidPromise = promise
return promise
end
-- Evaera promises
function HumanoidTracker:PromiseNextHumanoid()
if self.Humanoid.Value then
return Promise.resolve(self.Humanoid.Value)
end
if self._maid._nextHumanoidPromise then
return self._maid._nextHumanoidPromise
end
local promise = Promise.fromEvent(self.Humanoid.Changed, function(val)
return val ~= nil
end)
self._maid._nextHumanoidPromise = promise
return promise
end
Would also need to add a special case for the maid accepting promises, as these don't implement a .destroy method. I've been slowly converting libraries as I use them, would PRs be accepted on some separate branch?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inventorying Promise usages and Maid cleanup handling across the repository, using the issue's HumanoidTracker example as a syntax reference. Compare current calls with Evaera's roblox-lua-promise v4 API, then define the migration scope and verify that promise cleanup remains supported before converting libraries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100