Clean up Resource implementations in the editor
- Dominant language
- C++
- Stars
- 6.3k
- Forks
- 455
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 129
Description
We have a lot of implementations of the `Resource` protocol. These first ones all serve a purpose:
- `resource/FileResource`
- `resource/MemoryResource`
- `resource/ZipResource`
- `workspace/BuildResource`
Then there's these ones that we use in a few tests. I'm not sure why we need mock `Resources` at all, but surely one should suffice?
- `pipeline-test/TestResource`
- `test-util/FakeFileResource`
Finally, we have these that all appear to be hacks around limitations in `workspace/BuildResource`:
- `game-project/CustomResource`
- `game-project/DependencyMetadataResource` *new!*
- `gamepads/GamepadDatabaseBuildResource` *new!*
Two of these were recently introduced. Presumably to solve similar problems that `game-project/CustomResource` (apologetically, through comments) exists to solve. It seems to be spreading. Let's fix whatever is wrong with `workspace/BuildResource` instead!
Contributor guide
Research direction
Start by reading workspace/BuildResource and comparing it with game-project/CustomResource, game-project/DependencyMetadataResource, and gamepads/GamepadDatabaseBuildResource to identify the shared limitation. Then inspect pipeline-test/TestResource and test-util/FakeFileResource to understand their test uses. Done means consolidating unnecessary mock resources and removing the workaround implementations without breaking the affected tests.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100